“I’m stuck with upgrading a Rails app from 3.x to something – anything! – newer. Just #$&! kill me now.”
Chances are you will be given a limping Rails application written years ago by someone else that never made the upgrade to more recent versions. It’s a pain in the ass to figure out which version of Ruby to use for the version of Rails you are upgrading to.
This is a summary of several sources for which versions of Ruby are required and recommended for different Rails releases.
Rails version | Ruby version | Ruby end-of-life | Rails end-of-life |
6.0.0.beta1 | >= 2.5.0 | ||
5.0.0beta1 to 5.2.2 | >= 2.2.2 | ||
4.2.1 to 4.2.11 | >= 1.9.3, 2.2 recommended | ||
4.1 to 4.2.0 | >= 1.9.3, 2.1 recommended | ||
4.0.5 to 4.1.0.rc2 | >= 1.9.3 | February 23, 2015 | 4.1.x December 18. 2015 |
4.0.0.beta1 to 4.0.4 | >= 1.8.7 | June 2013 | 4.x March 20, 2017 |
3.2.22 to 3.2.22.5 | 1.8.7, 2.2 recommended | ||
3.2.13 to 3.2.22.4 | 1.8.7, 2.0 recommended | ||
0.8.0 to 3.2.13.rc2 | 1.8.7 | June 2013 | 3.2.22 June 16, 2015 |
Sources:
https://www.devalot.com/articles/2012/03/ror-compatibility
https://stackoverflow.com/questions/9087116/which-ruby-on-rails-is-compatible-with-which-ruby-version
https://weblog.rubyonrails.org/2013/2/27/Rails-3-2-13-rc1-has-been-released/
https://weblog.rubyonrails.org/2015/6/16/Rails-3-2-22-4-1-11-and-4-2-2-have-been-released-and-more/