Migrating/upgrading from Ruby 1.8.7, Rails 2.3.16 to more current versions

I have several inter-related questions regarding upgrading/migrating an existing application:

  1. What all can potentially break when migrating Ruby?
  2. Ditto for Rails?
  3. Are there step-by-step guides that can help with the process?
  4. Should I migrate the application in steps like - migrate from Ruby 1.8.7 to 1.9.2/1.9.3 and then at a future point to Ruby 2? Or is it better (same effort and better result) to do it in one straight sweep?
  5. Ditto for Rails?

Trying watching this railscast and see if it helps, I havent seen it but it might just do the trick #225 Upgrading to Rails 3 Part 1 - RailsCasts

1 Like

Thereā€™s lots of things can break when changing versions of ruby and rails. If youā€™ve got good test coverage this will obviously be easier. Iā€™ve found ruby version changes to be significantly less painful than the jump from rails 2.x to 3.x, so Iā€™d suggest starting there.

I would upgrade your rails 2.3.16 app to Ruby 1.9.3 at the outset. The jump from there to 2.0 will probably be completely without issue as there are very few backward incompatibilities. Iā€™d say just go straight to 2.0, but only the most recent version of rails 3.2 supports that. So youā€™ll have to wait on that.

Upgrading to rails 3.x is daunting. Iā€™ve read several places that itā€™s likely best to go from 2.x to 3.0.x and then to 3.2.x. 3.1 introduces the asset pipeline and you probably donā€™t want to deal with that on top of everything else. I recall seeing high praise for this guide, but I have not tried it myself. There are likely other guides available as well.

Good luck!

1 Like