# Error When creating custom plugin

**URL:** https://meta.discourse.org/t/error-when-creating-custom-plugin/69426
**Category:** Development
**Created:** [September 5, 2017, 7:53pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426 "2017-09-05T19:53:12Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![afall](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@afall](https://meta.discourse.org/u/afall)
#### Post date: [September 5, 2017, 7:53pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/1 "2017-09-05T19:53:13Z")

</div>

Dear Discourse Community,  
So I am following the instructions on [Developing Discourse Plugins - Part 1 - Create a basic plugin](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515) to create a discourse plugin, but everytime I add a new sub-directory in the plugins folder, and add a plugins.rb file in the sub-directory when I load up my discourse instance again I get the following error :Error while trying to load. I am running the instance as admin.

 ![09 PM](https://global.discourse-cdn.com/meta/original/3X/7/1/71ae216084f4e84207c64751ac54c37f34bd4d70.png)

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [September 5, 2017, 9:01pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/2 "2017-09-05T21:01:14Z")

</div>

To double check, are you adding a `plugins.rb` or `plugin.rb` file? It should be `plugin.rb` without the `s`.

---

<div class="post-metadata">

### Author: ![afall](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@afall](https://meta.discourse.org/u/afall)
#### Post date: [September 5, 2017, 9:22pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/3 "2017-09-05T21:22:45Z")

</div>

yeah I have a plugin.rb not plugins.rb

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 5, 2017, 9:23pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/4 "2017-09-05T21:23:46Z")

</div>

Can you paste the contents of your plugin.rb file here?

---

<div class="post-metadata">

### Author: ![afall](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@afall](https://meta.discourse.org/u/afall)
#### Post date: [September 5, 2017, 9:24pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/5 "2017-09-05T21:24:27Z")

</div>

there is nothing in it, I am just following the tutorial

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [September 5, 2017, 9:27pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/6 "2017-09-05T21:27:10Z")

</div>

According to the tutorial (emphasis mine):

> [@Developing Discourse Plugins - Part 1 - Create a basic plugin](https://meta.discourse.org/t/developing-discourse-plugins-part-1-create-a-basic-plugin/30515/1):
>
> In our case, we won’t be adding any ruby code but we still need the `plugin.rb`. Let’s create the directory `basic-plugin` with the file `plugin.rb` inside it, **with the following contents** :
> 
> **basic-plugin/plugin.rb**
> 
> ```plaintext
> # name: basic-plugin
> # about: A super simple plugin to demonstrate how plugins work
> # version: 0.0.1
> # authors: Awesome Plugin Developer
> 
> ```
> 
> Once you’ve created this file, you should restart your rails server and the plugin should be loaded.

---

<div class="post-metadata">

### Author: ![afall](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@afall](https://meta.discourse.org/u/afall)
#### Post date: [September 5, 2017, 9:33pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/7 "2017-09-05T21:33:23Z")

</div>

I named the directory something other than basic-plugin, does it have to have that name if the plugin.rb file is empty?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [September 5, 2017, 9:37pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/8 "2017-09-05T21:37:49Z")

</div>

The `plugin.rb` file cannot be empty. Please read the guide completely and carefully!

---

<div class="post-metadata">

### Author: ![afall](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@afall](https://meta.discourse.org/u/afall)
#### Post date: [September 5, 2017, 9:43pm UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/9 "2017-09-05T21:43:07Z")

</div>

yeah I see, I just added comments in it and now it shows up in the plugins url, thanks by the way

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [September 6, 2017, 10:29am UTC](https://meta.discourse.org/t/error-when-creating-custom-plugin/69426/10 "2017-09-06T10:29:14Z")

</div>


