I have an existing Rails 2.3.10 app that I’m considering upgrading to Ruby 1.9.2 from 1.8.7. Before I start hacking away at the application trying to get it to work, I’m trying to decide if it’s even worth the effort.
Just to get an idea of how much work might be involved, I’m simply running all the specs (rspec 1.3.1) in Ruby 1.9.2. 98% of the tests are passing, but they run about 3x slower and there are a ton of messages like “Ruby 1.9 doesn’t support Unicode normalization yet”. I found a post about this issue, so I know I can fix it, but I’m concerned about the speed and other issues I might run into.
My other option is to upgrade the application to Rails 3 and move to 1.9.2 at that time. This seems like a much better decision for the long term, but could potentially be a lot more work.
tl;dr – Should I upgrade to 1.9.2 now or wait until the application is on Rails 3?
I would recommend doing both, but the order in which you do them, or if you do them both at once is really a personal preference. If you have a strong test-suite with good coverage this is a great first step in making the transition. The main road-blocks you’ll run into are the following:
In general Ruby 1.9.2 will be faster than Ruby 1.8.7 and will provide some cool new syntax. If you are getting opposite results then I would benchmark your code and make sure that this is actually the case and that it’s not just failing tests that are slowing your suite down.