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 http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1

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