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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Jed Bradshaw](https://secure.gravatar.com/avatar/6bfe84550c99352d42a0630d9ad5e96f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jed Bradshaw
6,053 PointsError Code trying to Migrate
I had to uninstall Rails 4.0 and install 3.2.13. Now I think I have everything up and running Rails-wise correctly. However, when I try to start a server, the command console just spits out the 'Usage' directory and when I try to migrate, I get this error:
c:\Sites\treebook>rake db:migrate rake aborted! cannot load such file -- active_model c:/Sites/treebook/config/application.rb:3:in require' c:/Sites/treebook/config/application.rb:3:in' c:/Sites/treebook/Rakefile:4:in `' (See full trace by running task with --trace)
2 Answers
![Stone Preston](https://secure.gravatar.com/avatar/c2b2872f48c222732218df9be85e1ed2?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Stone Preston
42,016 Pointsdid you only uninstall the rails gem? There may be other rails related gems left over. I recommend doing another uninstall using this
$ gem uninstall rails
$ gem uninstall railties
If you didnt uninstall railties the first time you uninstalled then that could be what is causing your error
![Jed Bradshaw](https://secure.gravatar.com/avatar/6bfe84550c99352d42a0630d9ad5e96f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jed Bradshaw
6,053 PointsWhat I have done so far is remove all gems completely using this solution: http://shanky.org/2010/09/02/painlessly-remove-all-ruby-gems-on-windows/ and now I am re-installing Rails 3.2.13. I might just restart the entire tutorial. I will update this post to let everyone know how it goes.
Edit: Yes, apparently that was the problem. I don't know what I did but re-installing rails (gem install rails -v 3.2.13) seemed to fix the problem. After that, I redid this tutorial: http://teamtreehouse.com/library/programming/build-a-simple-ruby-on-rails-application/getting-started-with-rails/generate-a-rails-application and started a new app.
I still can't get my original one to work, but I'm ok with starting over. Practice makes perfect. If anyone wants to view my original failed treebook files I have them in a Dropbox link. Hopefully this will serve as a lesson to beginners for now: either don't use Rails Installer, or uninstall everything as soon as possible and then re-install 3.2.13 before starting your new adventure/app. Rails Installer will install Rails 4.0.0.rc2, and then you will run into all sorts of problems, and you may have to start over.
Original Post: https://teamtreehouse.com/forum/undefined-local-variable-for-or-method-config-for-mainobject-creating-an-authentication-system
Jed Bradshaw
6,053 PointsJed Bradshaw
6,053 PointsThanks your suggestion. Yes I did do that. Also, I tried 'gem clean'. Do you have any other ideas?! :) I am trying it again though, just to be sure.
Stone Preston
42,016 PointsStone Preston
42,016 Pointshmm try uninstalling everything again using the commands I listed above, and also uninstall the active model gem ( it may be just be a part of the active record gem im not really sure you might have to do some googling?) as well. It sounds like maybe you have some gem versions mixed in together with rails 4 and rails 3.2 gems. I would have thought uninstalling rail ties would have fixed it, but it might not have.
Jed Bradshaw
6,053 PointsJed Bradshaw
6,053 PointsOk, I did that. Now I have uninstalled and reninstalled and cleaned and messed with the active record gem and still nothing. And now I get this error when trying to start a server: c:\Sites\treebook>rails s C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/actio n_dispatch.rb:34:in `require': cannot load such file -- active_model (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2
.13/lib/action_dispatch.rb:34:in
<top (required)>' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1 3/lib/rails/commands/server.rb:3:in
require' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1 3/lib/rails/commands/server.rb:3:in<top (required)>' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1 3/lib/rails/commands.rb:49:in
require' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1 3/lib/rails/commands.rb:49:in<top (required)>' from bin/rails:4:in
require' from bin/rails:4:in `<main>'Ugh this is driving me crazy! Thanks for the help!