Posted 23 days ago. Visible to the public.

Installing Ruby <= 2.3 on Ubuntu 20.04+

Installing old Rubies (<= 2.3) with a standard rbenv + ruby-build is no longer possible on Ubuntu 20.04. This is because those Rubies depend on OpenSSL 1.0 which is no longer shipped with current Ubuntus.

We have forked ruby-build with a workaround that makes it compile and statically link the latest OpenSSL 1.0 version. This works on Ubuntu 20.04, as well as on Ubuntu 18.04.

To switch to our fork of ruby-build, update ruby-build like this

Copy
git -C ~/.rbenv/plugins/ruby-build remote add makandra https://github.com/makandra/ruby-build.git git -C ~/.rbenv/plugins/ruby-build fetch makandra git -C ~/.rbenv/plugins/ruby-build checkout -b local-openssl-for-old-rubies

At makandra, this comes preinstalled on new developer PCs.

Now "rbenv install 2.3" etc. will use the workaround and hopefully just work.

Note: When you try to install a very current Ruby version, our fork might not know about it. In this case, see this card

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Tobias Kraze
Last edit:
19 days ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Tobias Kraze to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more