Skip to content

Instantly share code, notes, and snippets.

@jmahoney
Created February 12, 2022 02:56
Show Gist options
  • Save jmahoney/c89b6bda4e80f5eca061c05d0f655188 to your computer and use it in GitHub Desktop.
Save jmahoney/c89b6bda4e80f5eca061c05d0f655188 to your computer and use it in GitHub Desktop.
Updating the versions of ruby that rbenv can see on ubuntu 20.04 LTS

When you install rbenv via apt on Ubuntu 20.4 it doesn't seem to see all the versions of ruby available

e.g this happened to me:

$ rbenv install 3.1.0
ruby-build: definition not found: 3.1.0

See all available versions with `rbenv install --list'.

If the version you need is missing, try upgrading ruby-build.

To upgrade ruby-build you need to clone it locally

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

After that, rbenv will see the versions you want.

If you ever get the error again you will need to do a git pull in the repo in ~/.rbenv/plugins/ruby-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment