views:

629

answers:

1

I can't figure this out. Capistrano keeps giving me this error:

 ** [out :: myserver.net] Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 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.

So, like the good error message says, I checked my config/environments.rb file and saw that indeed the RAILS_GEM_VERSION was indeed set to

RAILS_GEM_VERSION = '2.1.1' unless defined? RAILS_GEM_VERSION

I changed it to '2.1.2', since that's what I have on my server, and tried to capify again: same error.

So, I upgraded Rails on my development machine (2.1.1 -> 2.1.2) and tried it again: same error.

I tried commenting out the line: same error.

Finally, I logged on to my server, deleted everything in my project directory (removing any cached copies of config/environments.rb, I hoped), and tried it again. Same Error.

What's going on?!

+1  A: 

Okay - my problem was that I was forgetting to push the changes to config/environments.rb to my repository, so it Capistrano wasn't registering my changes when deploying.

Works fine now. I need a break... :)

neezer