# Creating a plugin

**URL:** https://meta.discourse.org/t/creating-a-plugin/107696
**Category:** Development
**Created:** [January 28, 2019, 8:17am UTC](https://meta.discourse.org/t/creating-a-plugin/107696 "2019-01-28T08:17:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Gael\_Koch](https://avatars.discourse-cdn.com/v4/letter/g/e68b1a/32.png) [@Gael\_Koch](https://meta.discourse.org/u/Gael_Koch)
#### Post date: [January 28, 2019, 8:17am UTC](https://meta.discourse.org/t/creating-a-plugin/107696/1 "2019-01-28T08:17:46Z")

</div>

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 [Developing Discourse Plugins - Part 1 - Create a basic plugin](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515) or [Rails plugin generator](https://meta.discourse.org/t/rails-plugin-generator/95907).

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
