ruby-build: definition not found: 2.2.3

I’ve used rbenv to update my Ruby dependencies in the past, usually without a problem. But, while trying to update to the Ruby’s 2.2.3 version, I ran across this error:

$rbenv install 2.2.3

ruby-build: definition not found: 2.2.3
The following versions contain `2.2.3' in the name:
rbx-2.2.3

After double checking that the current stable version is in fact 2.2.3, I looked into ways to update manually. The solution to this is in the ruby-build, a rbenv plugin that provides an install command to compile and install different versions of Ruby on UNIX-like systems. Additionally, I use a package manager, Homebrew, and the following commands worked for me.

$brew install ruby-build
    ==> Downloading https://github.com/sstephenson/ruby-build/archive/v20150928.tar.gz
    ==> Downloading from https://codeload.github.com/sstephenson/ruby-build/tar.gz/v20150928
    ######################################################################## 100.0%
    ==> ./install.sh
    🍺  /usr/local/Cellar/ruby-build/20150928: 172 files, 728K, built in 2 seconds

I then entered the following, which gave me a warning:

$brew link -f ruby-build
    Warning: Already linked: /usr/local/Cellar/ruby-build/20150928
    To relink: brew unlink ruby-build && brew link ruby-build

So I tried to update through git, which worked:

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

$rbenv global 2.2.3

$ruby -v
    ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]

I’m now up and running on the current stable version.