I have an old 2.1.1 Ruby on Rails application, with the system upgraded to use Ruby 1.8.7. It originally used 1.8.5 or so.
I want to upgrade it to Ruby 1.9.x for performance reasons, and possibly to a newer Ruby on Rails as well.
I cannot find any easy chart of compatibility between different Ruby versions and Ruby on Rails versions.
Will 2.1.1 work with Ruby 1.9.x? If not, how far do I need to upgrade it first, and what kind of issues am I likely to encounter? My application does complicated things to database layer, but the rest is fairly straightforward.
Rails 5.2 doesn't work with Ruby 3.0 #40938.
Use the newest Ruby3, which is old. If you're just starting with Ruby, install with Homebrew and work on a project with Ruby 3.0. When you start building another project, it may be time to install a version manager so you can juggle projects with different Ruby versions.
They set up the application to be dual-bootable in both Ruby 2.6 and Ruby 2.7 by using an environment variable, she said. "This made it easy for us to make backwards compatible changes, merge those to the main branch, and avoid maintaining a long running branch for our upgrade," she said.
This is an old question, but the fact that rails is tested against a version of ruby is a good indication that it should work on that version of ruby.
Since 9th April 2019, stable branches of Rails use Buildkite for automated testing, and the list of tested ruby versions, by rails branch, is:
Rails 6.1
>= 2.5.0
Rails 6.0
>= 2.5.0
Rails 5.2
>= 2.2.2
< 2.7
(see https://github.com/rails/rails/issues/38426)Rails 5.1
>= 2.2.2
Rails 5.0
>= 2.2.2
Rails 4.2
>= 1.9.3
Rails 4.1
>= 1.9.3
Prior to 9th April 2019, stable branches of Rails since 3.0 use travis-ci for automated testing, and the list of tested ruby versions, by rails branch, is:
Rails 3.0
Rails 3.1
Rails 3.2
Rails 4.0
Rails 4.1
Rails 4.2
Rails 5.0
Rails 5.1
Rails 5.2
Rails 6.0
(From https://www.hmallett.co.uk/2018/08/ruby-and-ruby-on-rails-version-compatibility/)
For versions < 3.2: http://www.devalot.com/articles/2012/03/ror-compatibility
For versions >= 4.0:
Rails 3.2
I tried stepping out of those recommendations (mainly running Rails 3.0 on Ruby 2.0 and 2.1), I ran in multiple weird issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With