500 Internal Server Error when starting rails

Hey guys, I have this problem. When I start up rails, everything works
just fine. I go to localhost:3000 and it shows that rails is up and
running. But when I go to a page in my site, or click “About your
application’s environment” I get a “500 Internal Server Error” on both
mongrel and webrick. So I did some research in my development log file,
and here is what came up:

Now, I’ve installed all the updaes. All my versions say 2.0.2, while I
have 2.1.0 installed??? Why doesn’t it use the new updated versions and
not these old outdated version (that as far as I know I’ve actually
deleted). I tried to go to my environment.rb to change it to
“RAILS_GEM_VERSION = ‘2.1.0’” and even tried commenting it out, but I
still get an error when trying to run the server:

“Missing the Rails 2.1.0 gem. Please ‘gem install -v=2.1.0 rails’,
update your RAILS_GEM_VERSION setting in config/environment.rb for the
Rails version you do have installed, or comment out RAILS_GEM_VERSION to
use the latest version installed.”


Any help would be GREAT. This seems like a problem with a simple
solution but I’ve been going in circles reinstalling and all and I’m
just pooped. Please let me know what I can do, thanks!!!

  • Jake

UPDATE:

I’ve gotten 2.1.0 to work for all the version. I made a new “demo” app
and loaded rails, and it seemed to work perfectly fine. Maybe I need to
“2.1.0-ify” my old app due to computability issues (or I suck at
coding???). Any help on converting it to work with the newer version of
rails would be awesome, THANK-YOU!!!

  • Jake

If your gem is not being picked up, you can try:

git clone git://github.com/rails/rails.git vendor/rails

from the rails root, if you have git, if not, im sure theres an svn
link around somewhere.

this will install rails as a plugin of rails (sounds weird i know).
And should work out of the box.

The error that you show in the stack trace seems like you have an
authenticated site and no route that matches login

to solve that, you might want to put this line in your routes;

map.login ‘/login’, :controller => ‘sessions’, :action => ‘login’

then in your views you can do:

<%= link_to login_url %>

also, you were right changing RAILS_GEM_VERSION to 2.1.0

On Jul 1, 7:19 am, “Jacob J.” [email protected]