First of all you must update ruby-build to update definitions list.
brew update
And update ruby-build
brew upgrade ruby-build
ruby-build --definitions
ruby-build 2.2.0 ~/.rubies/ruby-2.2.0
chruby ruby-2.2.0
chruby
echo "2.2.0" > .ruby-version
On Yosemite I've encountered a problem with irb and pry : when I use and accent char like é
this appears like unicode \U+FFC3\U+FFA9
.
To fix this, I installed readline :
brew install readline
Remove ruby install ( 2.2.2 in my case ) :
rm -rf ~/.rubies/ruby-2.2.2
Reinstall ruby 2.2.2
ruby-build 2.2.2 ~/.rubies/ruby-2.2.2
Ruby-build will automatically detect and use readline to enable UTF-8 input.
Some sources :