Could not find generator 'draper:install' rails 5

584 views Asked by At

Using rails 5 I added the gem

gem 'draper', '3.0.0.pre1'

then when I call the install generator I get an error

Could not find generator 'draper:install'. Maybe you meant 'devise:install', 'config:install' or 'responders:install'

Anything Im doing wrong here?

2

There are 2 answers

0
user3908184 On BEST ANSWER

Not sure if you still need an answer, but try putting the Github repo directly in your Gemfile. Looks like maybe the gem is not up-to-date in RubyGems.

gem 'draper', '3.0.0.pre1', github: 'drapergem/draper'
0
saadlulu On

Since I cant find any answer to this, and to be honest .. I only need a resource specific decorator I ended generating a decorator for each of my models.

rails generate resource Article

its working like intended.

thanks