Migrating your Rails programs to a new server

Editing the Environment

Ok, so now you've copied your project code over from your old server to your new server.
Chances are that the version of rails that you have on the new server is different
from your old server. In that case, you may need to make a few changes to your project. The first
change is to edit environment.rb

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION

Adjust the version of rails to match the version you have.

Then continue down the file and find the line that says:

Rails::Initializer.run do |config|

Below this, add the following lines in bold (needed if you're migrating from rails 1.x to rails 2.x)