Generators don't work.
opsaaaaa opened this issue · comments
I created a fresh rails project.
I was following the readme while adding some decorators.
Generators
To create an ApplicationDecorator that all generated decorators inherit from, run...
rails generate draper:install
When you have Draper installed and generate a controller...
.....
rails generate decorator Article
...to create the ArticleDecorator.
for rails generate decorator Article
I get
Could not find generator 'decorator'.
and basically the same message for rails generate draper:install
I created a decorator manually and it seems to work fine. just the generators that don't work.
Is this feature currently broken or have the generators been deprecated or am I missing something?
Hello @opsaaaaa 👋
This sounds like the gem has not been bundled. Make sure the gem is added to Gemfile
and then run bundle install
.
The generators should work after that.
@lxxxvi, Thank you but I am not a noob. Yes I remembered to install the gem.
Everything but the generators work. I have 7 decorators that run fine. The gem is installed and working.
I just created a new rails app with draper install and the generators work.
Apparently they also now work in the initial app I was using.
I don't know what happened, maybe it was something stupid like forgetting to bundle install
@lxxxvi
I'll Close this issue now.