Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't find 'devise_install' generator - Rails 2.3.8, Devise 1.0.8

I'm trying to get Devise up and running with a freshly generated Rails 2.3.8 app.

This is the error I'm running into:

devise > script/generate devise_install
Couldn't find 'devise_install' generator

I do have the Devise and Warden gems specified in my config file:

config.gem 'warden', :version => '0.10.7'
config.gem 'devise', :version => '1.0.8'

The gems are installed:

devise > rake gems 
 - [I] warden = 0.10.7
    - [R] rack >= 1.0.0
 - [I] devise = 1.0.8
    - [I] warden ~> 0.10.3
       - [R] rack >= 1.0.0
I = Installed
F = Frozen
R = Framework (loaded before rails starts)

Looking at the list of generators, I don't see anything from Devise:

devise > script/generate
Installed Generators
  Rubygems: cucumber, facebook, facebook_controller,
facebook_publisher, facebook_scaffold, feature, integration_spec,
publisher, rspec, rspec_controller, rspec_model, rspec_scaffold,
session, xd_receiver
  Builtin: controller, helper, integration_test, mailer, metal,
migration, model, observer, performance_test, plugin, resource,
scaffold, session_migration

Any clues?

like image 616
Chris Kilmer Avatar asked Jul 29 '10 20:07

Chris Kilmer


3 Answers

in 1.1.5 its rails generate devise:install. I have seen devise_install in some tutorials.

like image 159
Harry Forbess Avatar answered Oct 10 '22 19:10

Harry Forbess


I ran into the same problem myself and, unfortunately, didn't ever get it fixed. But I did manage to find a pretty simple workaround.

The tasks the generators perform are typically pretty straightforward. So manually reproducing the same result shouldn't be a big deal if you just take a look at the generator code.

The devise_install generator in your example above just copies devise.rb to config/initializers/devise.rb and en.yml to config/locales/devise.en.yml

If you take a look at the other generators I'm sure you can figure them out easily enough as well.

like image 30
aNoble Avatar answered Oct 10 '22 20:10

aNoble


The same problem occurred with me, because I'm already had installed devise (a version ahead of 1.0.8). I just uninstall the devise ahead version.

Now my enviroment has only devise 1.0.8 and it works very well. :)

like image 41
Fabrício Avatar answered Oct 10 '22 19:10

Fabrício