Topic: rake-problem in production with rails 1.2.1


Some days ago I've updated one of my rails-apps to run with the new rails version 1.2.1 - I changed the line RAILS_GEM_VERSION in my enviorment.rb to fit the new version.
Yesterday I rolled all back to 1.1.6, because my server (actually it is just an shared host) killed the fcgi-process after some minutes. maybe an memory issue. the roll back was no problem, because I've not used any of the new features in this app.

But after that (or maybe the update to 1.2.1 on the server by my hoster) I can't run any rake tasks. I get this error:

/files/app$rake migrate --trace               
(in /files/mite)
rake aborted!
can't activate rails (= 1.2.1), already activated rails-1.1.6]
/usr/local/lib/site_ruby/1.8/rubygems.rb:196:in `activate'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
/usr/lib/ruby/1.8/rake.rb:1641:in `load'
/usr/lib/ruby/1.8/rake.rb:1641:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:1713:in `run'

Line 10 in my Rakefile requires 'tasks/rails'. It seems the Rakefile tries to load the newest version of rails avaible... and fail because 1.1.6 is already loaded.

On my local development enviroment everything works fine with both versions of rails installed.

I couldn't find any informations on how to specify the rails-version rake should use. any suggestions?

Thank you.

Last edited by smunz (2007-01-30 16:28:36)

Re: rake-problem in production with rails 1.2.1

Is rails in the ./vendor/rails directory?  If so, try removing that whole folder.

Re: rake-problem in production with rails 1.2.1

No, i don't use any rails-version in the vendor directory. But I thought of freezing rails 1.1.6 to the vendor-dir as a solution wink