Ruby and Ruby on Rails version compatibility

I have recently been planning upgrades for an application which runs on both an old version of Ruby on Rails and an old version of Ruby.

The recommended upgrade path for rails is to upgrade through each version, rather than try and jump several versions in one go.  I.e 3.2 to 4.0 to 4.1 to 4.2 to 5.0 to 5.1 to 5.2. At each stage, a compatible version of Ruby will need to be used.

Finding which versions of Ruby are compatible with each rails version is quite hard, and while some rails release notes have recommended or minimum Ruby versions listed, there doesn’t seem to be a list of supported versions.

Googling reveals only old answers.

So I decided to see which versions of Ruby the rails project was testing against for each branch, on the basis that you wouldn’t test something if you weren’t going to try to support it. (UDPATE: Verified by David Heinemeier-Hansson)

This information can be found in the .travis.yml file in the rails source.

Versions of ruby that are targeted by travis-ci of the rails project, by -stable branch, excluding ruby-head:

Rails 3.0

  • 1.8.7
  • 1.9.2
  • 1.9.3

Rails 3.1

  • 1.8.7
  • 1.9.2
  • 1.9.3

Rails 3.2

  • 1.8.7
  • 1.9.2
  • 1.9.3
  • 2.0.0
  • 2.1.8
  • 2.2.6
  • 2.3.3

Rails 4.0

  • 1.9.3
  • 2.0.0
  • 2.1
  • 2.2

Rails 4.1

  • 1.9.3
  • 2.0.0
  • 2.1
  • 2.2.4
  • 2.3.0

Rails 4.2

  • 1.9.3
  • 2.0.0-p648
  • 2.1.10
  • 2.2.10
  • 2.3.7
  • 2.4.4

Rails 5.0

  • 2.2.10
  • 2.3.7
  • 2.4.4

Rails 5.1

  • 2.2.10
  • 2.3.7
  • 2.4.4
  • 2.5.1

Rails 5.2

  • 2.2.10
  • 2.3.7
  • 2.4.4
  • 2.5.1
Correct as of 12th August 2018.

Leave a Reply

Your email address will not be published. Required fields are marked *