From latest release we know it supports 2.3.1
On my machine I have the latest ruby-build
#brew info ruby-build [2.2.4]
ruby-build: stable 20160426, HEAD
...
But can't see 2.3.1 version
#rbenv install --list
...
2.2.4
2.3.0-dev
2.3.0-preview1
2.3.0-preview2
jruby-master+graal-dev
...
Sounds like you have duplicate rbenv or ruby-build installs.
Are you using rbenv from homebrew also? (brew info rbenv)
Did you install ruby-build as an rbenv plugin? (ls ~/.rbenv/plugins/ruby-build)
I've installed rbenv and ruby-build only by brew.
#brew info rbenv
[2.2.4]
rbenv: stable 1.0.0 (bottled), HEAD
Ruby version manager
https://github.com/rbenv/rbenv#readme
/usr/local/Cellar/rbenv/1.0.0 (36 files, 61.9K) *
Poured from bottle on 2016-05-20 at 22:20:34
...
#ls ~/.rbenv/plugins/ruby-build
LICENSE README.md bin install.sh script share test
it seems alright
Here's the same problem but for ubuntu https://discuss.circleci.com/t/add-ruby-2-3-1-support-to-rbenv-in-ubuntu-images/3680, I guessed it might be a problem in release itself.
You have ~/.rbenv/plugins/ruby-build which is a manual install, not a brew install (that's installed in /usr/local/opt/ruby-build).
rm -rf ~/.rbenv/plugins/ruby-build to drop your duplicate install.
You're right
I had the same issue where rebenv install --list did not show ruby 2.3.1.
I had ~/.rbenv/plugins/ruby-build but did not have a duplicate install in /usr/local/opt/ruby-build. Fix for me was to delete ruby-build and re-clone:
# rm -rf ~/.rbenv/plugins/ruby-build
# git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
If installed by homebrew, just reinstall ruby-build to latest one :
brew reinstall --HEAD ruby-build
it works!
I had the same issue. But after upgrading both rbenv and ruby-build did the trick.
brew upgrade rbenv
brew upgrade ruby-build
I was able to see all the latest ruby versions in the output of
rbenv install --list
Most helpful comment
If installed by
homebrew, just reinstallruby-buildto latest one :it works!