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!
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

Osgaldor Storm
1,119 PointsDevise install problem
I did all the install and setup to use devise in my treebook app, but when I try to start the rails server or do the user model generate part I get the following errors:
C:\Ruby200\apps\mhs88book>rails generate devise user
C:/Ruby200/apps/mhs88book/config/application.rb:23:in <module:Mhs88book>': unde
fined local variable or method
config' for Mhs88book:Module (NameError)
from C:/Ruby200/apps/mhs88book/config/application.rb:9:in <top (require
d)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman
ds.rb:44:in
require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman
ds.rb:44:in <top (required)>'
from bin/rails:4:in
require'
from bin/rails:4:in `<main>'
4 Answers

Brandon Barrette
20,485 PointsThe tutorials use rails 3.2.12 and ruby 1.9.3 I suggest sticking with that if you want to learn with the tutorials.

Brandon Barrette
20,485 PointsTo change the version of rails, go to your gemfile and change it to read:
gem 'rails', '3.2.12'
Then to change versions of ruby, you can't use rvm (Ruby Version Manager) because you are on Windows. It looks like you should investigate https://github.com/vertiginous/pik/ which is the windows version. Can't be of much help because I don't have windows nor have worked with it in many years.

Osgaldor Storm
1,119 PointsI've been able to track down the source of the problem. It comes when I add the following line to the application.rb file
config.assets.initialize_on_precompile = false
I took this out and my app is working again.

Osgaldor Storm
1,119 PointsI rolled everything back and got devise installed but after I submit the new user form I get this error:
Routing Error uninitialized constant StatusController
Rails.root: C:/Ruby200/apps/treebook

Brandon Barrette
20,485 PointsIs there more to the error? Check you terminal (where the server is running) and look for the error output.
Osgaldor Storm
1,119 PointsOsgaldor Storm
1,119 PointsI have no idea how to roll back my versions. I'm using the latest versions of both.
Osgaldor Storm
1,119 PointsOsgaldor Storm
1,119 PointsI've been asked to build an app very much like treebook for my high school class reunion. I need to get a handle on this asap.