Posted about 8 years ago. Visible to the public.

rbenv: How to update list of available Ruby versions on Linux

When you tell rbenv to install a Ruby it does not know about, you will get an error message.

Copy
$ rbenv install 2.1.2 ruby-build: definition not found: 2.1.2 You can list all available versions with `rbenv install --list'. If the version you're looking for is not present, first try upgrading ruby-build. If it's still missing, open a request on the ruby-build issue tracker: https://github.com/sstephenson/ruby-build/issues

(Fun fact: Recent versions of ruby-build will give you a more helpful error message which just tells you the following.)

On Linux, you probably installed ruby-build as an rbenv plugin. Updating is easy:

Copy
git -C ~/.rbenv/plugins/ruby-build pull

Done. Rbenv will know about the new versions immediately.

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

Owner of this card:

Avatar
Arne Hartherz
Last edit:
about 1 month ago
by Arne Hartherz
Keywords:
linux
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more