DEV Community

Cover image for RRRRb Matrix (Ruby, RubyGems, RuboCop, Rails, Bundler)
Peter H. Boling
Peter H. Boling

Posted on • Edited on

RRRRb Matrix (Ruby, RubyGems, RuboCop, Rails, Bundler)

Cover Photo by Sufyan


Other posts in my Compatibility Matrix Series

The world needs a modern matrix showing the maximum working versions of things in Ruby-land. So I made this.

ruby MRI ARM64&
MacOS 12
gem bundler rubocop
(install)
rubocop-lts(**)
(eval)
rails
1.8.7-p374 πŸ™… πŸ‘‹ 0.1 4.0.x
1.9.3-p551 πŸ™… 2.7.11 1.17.3 0.41.2 2.0 4.2.11.3
jruby-1.7.27 1.9 🌱 πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
2.0.0-p648 πŸ™… πŸ‘†οΈ πŸ‘†οΈ 0.50.0 4.0 πŸ‘†οΈ
2.1.10 πŸ™… πŸ‘†οΈ πŸ‘†οΈ 0.57.2 6.0 πŸ‘†οΈ
2.2.10 πŸ™… πŸ‘†οΈ πŸ‘†οΈ 0.68.1 8.0 5.2.8.1
2.3.8 πŸ™… 3.3.27 2.3.27 0.81.0 10.0 πŸ‘†οΈ
jruby-9.1.17.0 2.3 🌱 πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
2.4.10 πŸ™… πŸ‘†οΈ πŸ‘†οΈ 1.12.1 12.0 πŸ‘†οΈ
2.5.9 πŸ™… πŸ‘† πŸ‘†οΈ 1.28.2 14.0 6.0.6.1
jruby-9.2.21.0 2.5 🌱 πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
2.6.10 🌱 3.4.22 2.4.22 1.50.2 16.0 6.1.7.10
jruby-9.3.15.0 2.6 🌱 πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
2.7.8 🌱 πŸ‘†οΈ πŸ‘†οΈ 1.80.x 18.0 7.2.2.2
3.0.7 🌱 3.5.23 2.5.23 πŸ‘†οΈ 20.0 πŸ‘†οΈ
truffleruby-22.3.1 3.0 🌱 πŸ™…οΈ* πŸ™…οΈ* πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
3.1.7 🌱 3.6.9 2.6.9 πŸ‘†οΈ 22.0 πŸ‘†οΈ
truffleruby-23.0.0 3.1 🌱 πŸ™…οΈ* πŸ™…οΈ* πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
jruby-9.4.12.x 3.1 🌱 πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
3.2.9 🌱 3.7.x 2.7.x πŸ‘†οΈ 24.0 8.0.x
truffleruby-23.1.2 3.2 🌱 πŸ™…* πŸ™…οΈ* πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
3.3.9 🌱 πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
truffleruby-24.1.x 3.3.5 🌱 πŸ™…οΈ* πŸ™…οΈ* πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ
3.4.5 🌱 πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ πŸ‘†οΈ

* truffleruby intentionally does not support upgrading rubygems / bundler at all.
** rubocop-lts has even versions (odds are deprecated or non-extant).

Rubocop-LTS Even Versions:

"0.1.1"
"2.x.x"
"4.x.x"
"6.x.x"
# ... etc
Enter fullscreen mode Exit fullscreen mode

Latest even releases can be installed on Ruby 2.7+, but are able to evaluate Ruby code down to the minimum they target.
For example, rubocop-lts version 0.1.1 targets Ruby 1.8, and will work on libraries that support Ruby 1.8 - 3.x.
This is intended for applications and libraries that lint against a range of Ruby versions,
starting at some minimum version.

Magic install commands

On old Rubies you can't run gem update --system, nor bundle update --bundler, because they have fallen out of support. So in order to upgrade to the latest version that will work with an older ruby you can do this instead:

RUBYGEMS_VERSION=3.4.22
# Adds > /dev/null 2>&1 to make it quiet
gem install rubygems-update -v ${RUBYGEMS_VERSION} > /dev/null 2>&1
# Updates both RubyGems and Bundler!
update_rubygems > /dev/null 2>&1
Enter fullscreen mode Exit fullscreen mode

Top comments (1)