rbenv install --list does not list version 2.1.2

RubyMacosHomebrewOsx MavericksRbenv

Ruby Problem Overview


I installed rbenv via Homebrew on an OS X 10.9.3 MacBook Pro:

brew update
brew upgrade rbenv ruby-build

According to rbenv install --list on my laptop Ruby 2.1.0-dev is the latest.

Ruby Solutions


Solution 1 - Ruby

Both rbenv and ruby-build are generally installed from Github by cloning; That's how the authors recommend we install it.

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

If you didn't do it that way I'd recommend that method. Then, you can simply do:

cd ~/.rbenv
git pull
cd plugins/ruby-build
git pull

If you have several plugins use:

cd plugins
for i in *
do
  cd $i
  git pull
  cd -
done

I update every couple weeks just to pull in the latest fixes/changes.

Solution 2 - Ruby

I faced the same issue. I got the latest by running the following command:

brew upgrade --HEAD ruby-build

Solution 3 - Ruby

I had this issue on OS X 10.8.5 (so don't think OS related). I had tried updating rbenv & ruby-build via brew. 2.1.0-dev was still latest build available.

I had to force uninstall and re-install ruby-build via brew to fix the issue.

brew uninstall ruby-build --force
brew install ruby-build

Solution 4 - Ruby

I had the same issue. Even after running

brew upgrade rbenv ruby-build

I still didn't get ruby-2.1.2 on the available list. Following how to update list of available ruby versions on linux, I updated ruby-build through the following commands

cd ~/.rbenv/plugins/ruby-build
git pull

(I'm using OS X 10.9.4 MacBook Air)

Solution 5 - Ruby

This happened to me today. "rbenv install -l' displays outdated list while "ruby-build --definitions" returns the correct list. The problem is fixed by executing following command:

rm -Rf ~/.rbenv/plugins/ruby-build

It seems there is an outdated version of ruby-build under ~/.rbenv/plugins. Not sure when it got generated.

Solution 6 - Ruby

This link gives a good explanation of the two available options.

If you installed rbenv from the git repository:

$ cd ~/.rbenv/plugins/ruby-build
$ git pull

If you used Homebrew on OSX to install rbenv:

$ brew update
$ brew upgrade ruby-build

(Also running brew doctor might give you the exact solution.)

And if you have permission denied errors, this is my addition:

$ sudo chown -R $USER /usr/local; brew update
$ sudo chown -R $USER /usr/local; brew upgrade ruby-build

Then you'll be able to install the recent versions.

$ rbenv install --list
$ rbenv install 2.1.2

Solution 7 - Ruby

The selected answer will work fine, but the issue may have simply been caused by homebrew not having an up-to-date formula for ruby-build at the time. As of this posting, the appropriate ruby-build formula has been put into the latest version of homebrew. So running:

$ brew update

should get you version needed to get the latest ruby. Then, running rbenv install --list again should list 2.1.2 (and others).

So if anyone sees this later on, hopefully you can avoid having to maintain the individual repositories if you'd rather use homebrew for package management.

Solution 8 - Ruby

I've just updated ruby-build and ruby-install to latest versions and both have the latest ruby 2.1.2

Probably rbenv doing something nasty.

Solution 9 - Ruby

Following all the above, on OSX 10.11 it still wouldn't list the latest versions. What I did below worked for me- I removed the dir, re-installed from brew then I had to link in brew like this:

$ brew uninstall ruby-build --force
$ rm -Rf ~/.rbenv/plugins/ruby-build

and then

$ brew install ruby-build
$ brew link --overwrite ruby-build

and then I saw the most recent versions to build.

Solution 10 - Ruby

> cd /home/[user]/.rbenv/plugins/ruby-build && git pull && cd -

Don't forget to replace [user] with your user

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlevyView Question on Stackoverflow
Solution 1 - Rubythe Tin ManView Answer on Stackoverflow
Solution 2 - RubyVenkatesh NannanView Answer on Stackoverflow
Solution 3 - RubyGrahamSherryView Answer on Stackoverflow
Solution 4 - RubyTomohiro KoanaView Answer on Stackoverflow
Solution 5 - RubyJames GanView Answer on Stackoverflow
Solution 6 - RubyAmitFView Answer on Stackoverflow
Solution 7 - RubyakowalzView Answer on Stackoverflow
Solution 8 - RubyIsmaelView Answer on Stackoverflow
Solution 9 - RubyAndy DView Answer on Stackoverflow
Solution 10 - RubySalma GomaaView Answer on Stackoverflow