Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Deleted User

Devise Not Installing

I've added gem 'devise' into the Gemfile

Then I call bundle install in terminal. All appears to be well.

Trouble hits after I do rails generate devise:install

This is all that comes back: Called from: /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.

/usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails/routes.rb:443:in raise_no_devise_method_error!': Install does not respond to 'devise' method. This usually means you haven't loaded your ORM file or it's being loaded too late. To fix it, be sure to require 'devise/orm/YOUR_ORM' inside 'config/initializers/devise.rb' or before your application definition in 'config/application.rb' (RuntimeError) from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails/routes.rb:211:inblock in devise_for' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails/routes.rb:207:in each' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/devise-2.2.3/lib/devise/rails/routes.rb:207:indevise_for' from /Users/Skynet/treebook/config/routes.rb:2:in block in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:282:ininstance_exec' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:282:in eval_block' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:260:indraw' from /Users/Skynet/treebook/config/routes.rb:1:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:inload' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in block in load' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:inload_dependency' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in load' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:40:inblock in load_paths' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:40:in each' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:40:inload_paths' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:16:in reload!' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:26:inblock in updater' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:in call' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:inexecute' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:27:in updater' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:9:inrescue in execute_if_updated' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:7:in execute_if_updated' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application/finisher.rb:66:inblock in <module:Finisher>' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in instance_exec' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:inrun' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:55:in block in run_initializers' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:ineach' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in run_initializers' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:136:ininitialize!' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in method_missing' from /Users/Skynet/treebook/config/environment.rb:5:in<top (required)>' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in require' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:inblock in require' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in load_dependency' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:inrequire' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:103:in require_environment!' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:25:in<top (required)>' from script/rails:6:in require' from script/rails:6:in<main>'

I can't figure out how to fix it. Any thoughts?

12 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Matt, this is kind of strange. Can you zip up your project folder and email it to help@teamtreehouse.com?

Deleted User

Hi Jason,

I sent the email with the zip of the project folder your way. Thanks!

Hi Jason, I'm getting a similar issue. It says:

Lorcans-MacBook-Pro:treebook l$ rails generate devise:install SECURITY WARNING: No secret option provided to Rack::Session::Cookie. This poses a security threat. It is strongly recommended that you provide a secret to prevent exploits that may be possible from crafted cookies. This will not be supported in future versions of Rack, and future versions will even invalidate your existing user cookies.

    Called from: /usr/local/rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.

Could not find generator devise:install.

Does that sound familiar to you? Lorcan

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Lorcan, try running bundle install again and then rails generate devise:install.

No I got the same error even though it is saying Your bundle is complete!

Don't know if you ever found the answer, but I was having the same problem and after a while figured it out.

I went to my routes.rb file and commented out the line devise_for :installs

Then I went back and reran rails generate devise:install

Tony, you're a rockstar this worked for me :-)

Thanks man!

That works great. It was giving me a headache.

Helped me out. How did you figure that out. Thanks

Thanks Tony, worked for me!

Brandon Harvey
Brandon Harvey
5,709 Points

This still is not working for me. I went into the routes.rb folder, but the whole folder was practically commented out. What was not, I commented out one by one to see if that would work and it didnt. Any help?

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey brandon harvey can you paste a link to your code up on GitHub?

Brandon Harvey
Brandon Harvey
5,709 Points

Throw it up to the celebrity feedback!! woot woot

It turns out that I created multiple Treebook directories and I was in the wrong one. I had to restart, however, because after I installed devise stuff kept messing up. The code for bootstrap didn't work too well either because I had version 3, and was following version 2 instructions.... I'll let you know if I encounter problems again, though.

Daniel Gibbons
Daniel Gibbons
2,057 Points

It's not working for me either. I keep getting: 'could not find generator devise:install'

I wrote down both gem 'devise' and then deleted that and added gem 'devise', '3.2.13'

both did not work

Hey guys! in my case I install de gem without problems, but latter I try to generate the model 'rails generate devise user' and don't work, I'm trying to fix it but its imposible.

Please check if you have some time my threebook on repo: https://github.com/fbavaro56/franbook

Thank's!

I have fixed the problem, I think rails 4.0.2 change the routing sintax, in routes.rb read a default route example commented and don't use the code ':to' , simple " root 'statuses#index' " and it works!!!! LOL a Seifer finish smile for this!!