Michael Durrant
Michael Durrant

Reputation: 96544

rbenv doesn't have the ruby version and the ruby-build plugs directory doesn't exist, what to do?

rbenv doesn't show the newer versions of Ruby.
Various guides say to update ruby build but I don't have the ruby-build directory set up to do that in my installation.

What should I do?

Upvotes: 3

Views: 1878

Answers (1)

Michael Durrant
Michael Durrant

Reputation: 96544

Follow these steps:

# confirm version NOT available
$ rbenv install --list | grep 2.6.2
# Nothing shows up

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

$ rbenv install --list | grep 2.6.2
2.6.2 # <-- Now it shows up !

Now that version can be installed locally

$ rbenv install 2.6.2
$ ruby -v
$ ruby 2.6.2p47

One final step I had to do was

$ bundle # -> this gave an error "You must use Bundler 2 or greater with this lockfile."
$ gem install bundler:2.0.1

Finally, a

$ bundle

for a project with a .ruby-version file of 2.6.2 will work !

Upvotes: 10

Related Questions