Using the older Rake (0.7.3)

You have updated rake to the newer version and only to find out that it does not work with older Rails tasks.

Certainly the rake 0.8.3 is not compatible with the Rails 1.2.3. If you try rake db:migrate, it fails with error: undefined method `last' for {:prepare=>:environment}:Hash.

To invoke the older rake use rake _0.7.3_ db:migrate. Obviously rake version 0.7.3 must be installed.

Older rake on remote

To invoke older rake in the remote server on your capistrano task, such as cap deploy:migrate, set which rake to use in the deploy.rb using set :rake, "rake _0.7.3_".

Leave a Comment