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 trialDevise 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:in
block 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:in
devise_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:in
instance_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:in
draw'
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:in
load'
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:in
load_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:in
block 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:in
load_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:in
block 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:in
execute'
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:in
rescue 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:in
block 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:in
run'
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:in
each'
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:in
initialize!'
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:in
block 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:in
require'
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
Treehouse Guest TeacherHey Matt, this is kind of strange. Can you zip up your project folder and email it to help@teamtreehouse.com?
Hi Jason,
I sent the email with the zip of the project folder your way. Thanks!
Lorcan Mcneela
1,755 PointsHi 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
Treehouse Guest TeacherHey Lorcan, try running bundle install again and then rails generate devise:install.
Lorcan Mcneela
1,755 PointsNo I got the same error even though it is saying Your bundle is complete!
Tony Zazo
1,932 PointsDon'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
Nathan Yates
500 PointsTony, you're a rockstar this worked for me :-)
Mukul Thakur
2,108 PointsThanks man!
Radhika Gokulnath
Courses Plus Student 2,729 PointsThat works great. It was giving me a headache.
Patrick Beattie
6,064 PointsHelped me out. How did you figure that out. Thanks
Justin Mandell
1,370 PointsThanks Tony, worked for me!
Brandon Harvey
5,709 PointsThis 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
Treehouse Guest TeacherHey brandon harvey can you paste a link to your code up on GitHub?
Brandon Harvey
5,709 PointsThrow 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
2,057 PointsIt'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
Francisco Bavaro
1,671 PointsHey 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!
Francisco Bavaro
1,671 PointsI 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!!