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


Devise 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 methodconfig' 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:inrequire' 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:inrequire' from bin/rails:4:in `<main>'

4 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

The tutorials use rails 3.2.12 and ruby 1.9.3 I suggest sticking with that if you want to learn with the tutorials.

I have no idea how to roll back my versions. I'm using the latest versions of both.

I'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.

Brandon Barrette
Brandon Barrette
20,485 Points

To 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.

I'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.

I 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
Brandon Barrette
20,485 Points

Is there more to the error? Check you terminal (where the server is running) and look for the error output.