Upgrading the Rails Version Used by an Existing Application

Let’s say that I use Rails version 2.3.2 to create a new application
(e.g., “rails my_application”). Later I want to port that same
application to a different server that’s running Rails version 2.3.5.
I thought I would be able to just create a tarball of the original
application and re-deploy it on the new server. Apparently not. On
startup, Passenger (I’m running Passenger) complains that the
application requires Rails 2.3.2.

It would seem to be kind of messy to have to create a virgin
application on the new server using Rails 2.3.5, configure it, and
then have to copy all of the old files from the original application
into it. I’m hoping that there is an easier way. Is there?

Thanks for any input.

          ... doug

On Feb 18, 7:19 pm, doug [email protected] wrote:

Let’s say that I use Rails version 2.3.2 to create a new application
(e.g., “rails my_application”). Later I want to port that same
application to a different server that’s running Rails version 2.3.5.
I thought I would be able to just create a tarball of the original
application and re-deploy it on the new server. Apparently not. On
startup, Passenger (I’m running Passenger) complains that the
application requires Rails 2.3.2.

Check your config/environment.rb. It sounds like you’re relying gems
installed on the server? In which case you need to change the line in
environment.rb that specifies which version of Rails your app depends
on.

You should see a line near the top that says:

RAILS_GEM_VERSION = ‘2.3.2’ unless defined? RAILS_GEM_VERSION

You need to change this to 2.3.5.

However, make sure you do this on your development box and test it
first; there were a few nontrivial changes from 2.3.2 to 2.3.5. Make
sure you run rake rails:update as well.

Jeff

I have not yet done detailed testing; but, at least superficially,
your suggestion seems to have resolved the issue. Thanks very much
for the input.

    ... doug