I want to install the latest stable version of Ruby available with rbenv. This feature won\'t be happening in rbenv itself.
When I run the command rbenv instal
After quite a bit of trial-and-error I figured out a way to grab the latest stable version from this list. This isn't perfect as it just grabs the correct pattern and the last version of it, but it should get the job done. It will work as long as the versions are in order.
This will produce 2.2.2
rbenv install -l | grep -P "^ [[:digit:]]\.[[:digit:]]\.[[:digit:]]$" | tail -1
We can plug that result into rbenv install
like this:
rbenv install $(rbenv install -l | grep -P "^ [[:digit:]]\.[[:digit:]]\.[[:digit:]]$" | tail -1)