-
Install OpenSSL via homebrew, if you haven't already. Without this, ruby install will fail trying to compile openssl.
brew install openssl
-
Install readline via homebrew, if you haven't already. This allows
irb
to support multi-line characters correctly in.brew install readline
-
Install rbenv and ruby-build, if you haven't already
brew install rbenv brew install ruby-build
-
Compile Ruby with the homebrew-installed openssl and readline
CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p247
Wait a while...
-
Set rbenv version to the newly installed 2.0.0-p247
rbenv global 2.0.0-p247
-
Check it works
$ irb irb(main):001:0> foo = "あいうえお" => "あいうえお" irb(main):002:0>
Yay!