# Rake rails:update for older version

**URL:** <https://www.ruby-forum.com/t/rake-rails-update-for-older-version/126739>\
**Category:** Rails\
**Created:** [January 21, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/rake-rails-update-for-older-version/126739 "2008-01-21T20:37:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkoebbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Post date:** [January 21, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/rake-rails-update-for-older-version/126739/1 "2008-01-21T20:37:52Z")

</div>

I’ve been running 1.2.3 for a long time and just the other day  
installed 1.2.6 to prepare for an eventual upgrade to 2.x. While I  
was at it, I installed 2.0.2 which I plan to use for a new app I’m  
writing. I figure it will be less painful to learn about 2.0 in a  
new app and then upgrade an existing one (since the existing one will  
be in production when I upgrade it). So after installing the new  
gems, I changed environment.rb to RAILS\_GEM\_VERSION = “1.2.6”, and I  
also had to change a couple of require\_gem statements to gem in  
boot.rb. Everything seems fine so far.

I just (10 minutes ago) saw someone reference rake rails:update  
which, I suppose, one should run after updating an app to a newer  
version of rails. Can a version number be passed to that rake task or  
does it update to the latest installed version? Or will it use  
what’s defined in the app itself? I wouldn’t want my 1.2.6 app  
upgraded to 2.0.2.

BTW, I guess I’m only concerned about this in case there are other  
config/system files out there that need to be update, primarily the  
require\_gem/gem situation. And there might be other things that I’m  
not aware of.

Peace,  
Phillip

---

<div class="post-metadata">

**Author:** ![pkoebbe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Post date:** [January 21, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/rake-rails-update-for-older-version/126739/2 "2008-01-21T22:07:28Z")

</div>

On 21 Jan 2008, at 19:37, Phillip K. wrote:

> I just (10 minutes ago) saw someone reference rake rails:update  
> which, I suppose, one should run after updating an app to a newer  
> version of rails. Can a version number be passed to that rake task or  
> does it update to the latest installed version? Or will it use  
> what’s defined in the app itself? I wouldn’t want my 1.2.6 app  
> upgraded to 2.0.2.

It updates to the right version (ie if the gems that app uses are  
version 2.0.2 then it updates to 2.0.2): it’s just copying some files  
from itself into your app.

Fred
