- Mac OS X Mountain Lion (10.8.2)
- Homebrew
- readline
- rbenv
Install ruby-build as a rbenv plugin:
$ mkdir -p ~/.rbenv/plugins
$ cd ~/.rbenv/plugins
$ git clone git://github.com/sstephenson/ruby-build.git
or update ruby-build:
$ cd ~/.rbenv/plugins/ruby-build
$ git pull
$ brew link readline
$ export RUBY_VERSION=ruby-1.9.3
$ CONFIGURE_OPTS="--with-readline-dir=/usr/local" rbenv install $RUBY_VERSION
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz...
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/juno/.rbenv/versions/$RUBY_VERSION
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$RUBY_VERSION.tar.gz...
Installing ruby-1.9.3-p392...
Installed ruby-1.9.3-p392 to /Users/juno/.rbenv/versions/1.9.3-p392
$ brew unlink readline
$ rbenv global 1.9.3-p392
$ ruby -v
ruby 1.9.3p392 ....
done.