# Switching to Rails 2.1

**URL:** <https://www.ruby-forum.com/t/switching-to-rails-2-1/146500>\
**Category:** Rails\
**Created:** [August 21, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/switching-to-rails-2-1/146500 "2008-08-21T19:28:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![birk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f0a364/32.png) [@birk](https://www.ruby-forum.com/u/birk)\
**Post date:** [August 21, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/switching-to-rails-2-1/146500/1 "2008-08-21T19:28:23Z")

</div>

Hi everyone.

Here is my problem:  
I’ve been working on a RoR project for a while (its quite big  
project), but have to stop the work on it for some half a year. Now  
I’m back on it and I’d like to switch to the newest version of Rails  
(my project is using Rails 1.2.6). Any tips how can this be done in  
some painful fashion? Plus I would like to pick the Rails 2.1 on the  
way as easily as possible. Any tips here, too?

---

<div class="post-metadata">

**Author:** ![birk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f0a364/32.png) [@birk](https://www.ruby-forum.com/u/birk)\
**Post date:** [August 21, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/switching-to-rails-2-1/146500/2 "2008-08-21T19:50:03Z")

</div>

On 21 Aug 2008, at 18:28, nightcoder wrote:

> Hi everyone.
> 
> Here is my problem:  
> I’ve been working on a RoR project for a while (its quite big  
> project), but have to stop the work on it for some half a year. Now  
> I’m back on it and I’d like to switch to the newest version of Rails  
> (my project is using Rails 1.2.6). Any tips how can this be done in  
> some painful fashion? Plus I would like to pick the Rails 2.1 on the  
> way as easily as possible. Any tips here, too?

install the gems, change environment.rb to use the new ones. (or if  
you’ve frozen rails into your project then just refreeze it).

Fred

---

<div class="post-metadata">

**Author:** ![birk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f0a364/32.png) [@birk](https://www.ruby-forum.com/u/birk)\
**Post date:** [August 22, 2008, 1:36am UTC](https://www.ruby-forum.com/t/switching-to-rails-2-1/146500/3 "2008-08-22T01:36:17Z")

</div>

Quoting nightcoder [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Hi everyone.
> 
> Here is my problem:  
> I’ve been working on a RoR project for a while (its quite big  
> project), but have to stop the work on it for some half a year. Now  
> I’m back on it and I’d like to switch to the newest version of Rails  
> (my project is using Rails 1.2.6). Any tips how can this be done in  
> some painful fashion? Plus I would like to pick the Rails 2.1 on the  
> way as easily as possible. Any tips here, too?

I’d suggest moving to 2.0 first. It should be fairly painless since  
your  
project is already at. Deal with any deprecated warnings before moving  
to  
2.0. If you were using pagination, migrate to will\_paginate as part of  
the  
move to 2.0. Run the automated tests, beat on it a few days, check  
everything  
into version control. Search out blogs on Rails 2.1; Google is your  
friend.  
I recommend the screen casts by Ryan B. at  
[Ruby on Rails Screencasts - RailsCasts](http://railscasts.com/tags/20) and Riding Rails blog,  
especially  
[Ruby on Rails — Rails 2.1: Time zones, dirty, caching, gem dependencies, caching, etc](http://weblog.rubyonrails.org/2008/6/1/rails-2-1-time-zones-dirty-caching-gem-dependencies-caching-etc)

HTH,  
Jeffrey

---

<div class="post-metadata">

**Author:** ![birk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f0a364/32.png) [@birk](https://www.ruby-forum.com/u/birk)\
**Post date:** [September 9, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/switching-to-rails-2-1/146500/4 "2008-09-09T20:45:52Z")

</div>

Milan Novota wrote:

> Here is my problem:  
> I’ve been working on a RoR project for a while (its quite big  
> project), but have to stop the work on it for some half a year. Now  
> I’m back on it and I’d like to switch to the newest version of Rails  
> (my project is using Rails 1.2.6). Any tips how can this be done in  
> some painful fashion? Plus I would like to pick the Rails 2.1 on the  
> way as easily as possible. Any tips here, too?

- Switch to 2.1 (or 2.0, stepwise)
- run all your tests
- when a test fails, pass it
- switch back to 1.2.6
  - revert your config/boot.rb
  - comment out the 2.1.0 line in config/environment.rb
  - integrate the new stuff in scripts and public\*

- pass all tests and integrate

Repeat until all tests pass in 2.1…

\*except if you have a JS that requires an old version of prototype.js…

–  
Phlip

---

<div class="post-metadata">

**Author:** ![birk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f0a364/32.png) [@birk](https://www.ruby-forum.com/u/birk)\
**Post date:** [September 9, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/switching-to-rails-2-1/146500/5 "2008-09-09T17:07:08Z")

</div>

Thank you both!

– Milan Novota

2008/8/22 Jeffrey L. Taylor [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
