# Upgrading the Rails Version Used by an Existing Application

**URL:** <https://www.ruby-forum.com/t/upgrading-the-rails-version-used-by-an-existing-application/183719>\
**Category:** Rails\
**Created:** [February 19, 2010, 2:20am UTC](https://www.ruby-forum.com/t/upgrading-the-rails-version-used-by-an-existing-application/183719 "2010-02-19T02:20:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [February 19, 2010, 2:20am UTC](https://www.ruby-forum.com/t/upgrading-the-rails-version-used-by-an-existing-application/183719/1 "2010-02-19T02:20:49Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [February 19, 2010, 2:47am UTC](https://www.ruby-forum.com/t/upgrading-the-rails-version-used-by-an-existing-application/183719/2 "2010-02-19T02:47:45Z")

</div>

On Feb 18, 7:19 pm, doug [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![djames](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@djames](https://www.ruby-forum.com/u/djames)\
**Post date:** [February 19, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/upgrading-the-rails-version-used-by-an-existing-application/183719/3 "2010-02-19T18:31:27Z")

</div>

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
```
