I'm about to start working on porting a company's old rails ap from 2.3/1.87 to the most recent version of rails. Should I wait for rails 4, or should I just to 3.2?
We're going to take the opportunity to make sure there is full test coverage, and there will probably be some rewriting involved as well. The first goal is to make sure all current functionality is operational.
We want as much of the current codebase as-is to work under the most recent version of rails. We will rewrite any parts that don't.
I would consider the following two choices:
A) Re-write the app.
In this case I would do it in rails 3.2.10 Don't wait until 4 as it has to be released, shaken down, bugs found, etc. With rails it's almost never good to wait as it has such a rapid release cycle with major changes. Something I've learned the hard way over the last couple of years.
B) Upgrade it incrementally.
I would also not wait until 4 comes, go to 3.2.10 now. Start by updating the 2.3 app to rails 3.0 This will probably not actually be that hard. There are a few format changes and active record changes but most are fairly straight-forward and documented well by others. Take careful note of deprecation warnings as these are often introduced in rails versions x.0 and then actually removed in x.1 (so in this case that means 3.0 and 3.1)
Once this is complete and you've kicked the tires around and made sure everything works, then move on to upgrading to rails 3.1 This is actually a pretty big upgrade as it introduces the asset pipeline. You'll need to read up on that and follow the advice. Don't 'cop out' by not using it for production. Basically it does two key things: minifies js code and compiles all js and css code into 1 file (each). This help speeds up web pages and reduce server requests for all the individual assets.
Next upgrade ruby from 1.8.7 to 1.9.3 This should be relatively painless but as with all the steps check the app carefully and obviously if you have automated regression tests they should be run (same for each step outlined here).
Finally upgrade rails from 3.1 to 3.2.11 which includes a security fix.
Which choice you make will depends on a great number of other factors, both technical and non-technical, including:
Useful Resources: