Error When creating custom plugin


(Aziz Fall) #1

Dear Discourse Community,
So I am following the instructions on Beginner's Guide to Creating Discourse Plugins - Part 1 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.


(Joshua Rosenfeld) #2

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


(Aziz Fall) #3

yeah I have a plugin.rb not plugins.rb


(David Taylor) #4

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


(Aziz Fall) #5

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


(Joshua Rosenfeld) #6

According to the tutorial (emphasis mine):


(Aziz Fall) #7

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


(Joshua Rosenfeld) #8

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


(Aziz Fall) #9

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


(Régis Hanol) #10