Dear Discourse Community,
So I am following the instructions on Developing Discourse Plugins - Part 1 - Create a basic plugin 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.
AI-generated summary
A user, afall, encountered an error while trying to create a custom Discourse plugin, as described in the official guide. The issue arose when adding a subdirectory with a plugin.rb file, but the error occurred due to an empty plugin.rb file. jomaxro clarified that the file must not be empty and pointed out the guide’s requirement for specific content. afall confirmed that after adding comments to the file, the plugin appeared correctly in the plugins URL, resolving the issue afall.
To double check, are you adding a plugins.rb or plugin.rb file? It should be plugin.rb without the s.
yeah I have a plugin.rb not plugins.rb
Can you paste the contents of your plugin.rb file here?
there is nothing in it, I am just following the tutorial
According to the tutorial (emphasis mine):
I named the directory something other than basic-plugin, does it have to have that name if the plugin.rb file is empty?
The plugin.rb file cannot be empty. Please read the guide completely and carefully!
yeah I see, I just added comments in it and now it shows up in the plugins url, thanks by the way
