Creating a plugin


(Gaël Koch) #1

Hi,

I have very little knowledge of how Discourse works but I need to create a plugin. I’ve seen the different Guides on how to create a plugin like Beginner's Guide to Creating Discourse Plugins - Part 1 or Rails plugin generator.

  1. I don’t know how to find the “plugins” directory ? I’ve looked under /var/discourse/ and /var/lib/docker/ but I can’t find the one that is used by Discourse.

  2. I don’t understand how to use the Rails plugin generator.

rails g plugin DiscourseRacoon

I’m trying to use this command but I always have this result

root@discourse:~# rails g plugin testPLugin
Usage:
  rails new APP_PATH [options]
Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice

I’ve tried to look for answers on how those commands and on how Discourse works but I can’t find any.
I hope I’ve been clear on what I’m searching for and thanks for any answer