In the attempt to install ruby 2.7.1 using rbenv I noticed the version was not listed on my ubuntu 18.04
$ rbenv install -l | grep 2.7.
2.7.0-dev
2.7.0-preview1
jruby-9.2.7.0
rbx-2.71828182
In the attempt to install ruby 2.7.1 using rbenv I noticed the version was not listed on my ubuntu 18.04
$ rbenv install -l | grep 2.7.
2.7.0-dev
2.7.0-preview1
jruby-9.2.7.0
rbx-2.71828182
So I found this great resource: here
On Linux, you probably installed ruby-build as an rbenv plugin. Updating is easy:
I checked if ruby-build was installed with
$ ruby-build --version
ruby-build 20190615-7-g0e9094b
I checked if ruby-build was associated with rbenv checking the installation path:
$ which ruby-build
/home/[username]/.rbenv/plugins/ruby-build/bin/ruby-build
git -C ~/.rbenv/plugins/ruby-build pull
as suggested in the resource this solved the problem for me.
I also noticed as I tried to install an inexistent version that the command gives the same suggestion
$ rbenv install 2.7.7
ruby-build: definition not found: 2.7.7
See all available versions with `rbenv install --list'.
If the version you need is missing, try upgrading ruby-build:
git -C /home/[your_user]/.rbenv/plugins/ruby-build pull
As Chilianu Bogdan mentioned, rbenv
does not manage version by itself, its done via ruby-build
. If you have it as a plugin, git -C "$(rbenv root)"/plugins/ruby-build pull
should indeed work.
In case you don't have plugins/ruby-build
directory, most probably ruby-build
is installed as standalone app, and you need to upgrade it via package manager or source pull & reinstall