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
Mine is similar to Anonymous's answer (but shorter because I'm using \d).
rbenv install -l| grep -P "\s2.*(\.|\d)\d$" | tail -1
I wanted to specify the latest jruby, which is why I used a "2", so I can replace the 2 with "jruby":
rbenv install -l| grep -P "\sjruby.*(\.|\d)\d$"|tail -1
You can replace jruby with other strings to get different types of ruby, e.g. rbx, mruby.