Rails generate model inside engine not working

553 Views Asked by At

I just initialized a new rails 4.0.1 with the following command:

rails plugin new gossiper -T --dummy-path=spec/dummy

When I try to generate a model I get the rails g help, telling me that I am not inside an rails app.

rails g model Notification user_id:integer

Usage:
  rails new APP_PATH [options]

Edit

I just realized I missed the --mountable params. Sorry.

Any suggestions on that?

2

There are 2 best solutions below

0
On

You have to issue the command from within a rails console and NOT the terminal.

Run "rails c" and try again.

0
On

I just realized I missed the --mountable params. Sorry.