$ brew update
$ brew upgrade rbenv
$ cd ~/.rbenv/plugins/ruby-build
$ git pull
$ brew install openssl
$ brew install readline
※-Wshorten-64-to-32
と警告が出るので無視するようexport CFLAGS=-Wno-error=shorten-64-to-32
する
※2.0.0-p0
インストール時にopensslのディレクトリを指定するようRUBY_CONFIGURE_OPTS="--with-openssl-dir=brew --prefix openssl"
を追加する
$ brew link readline --force
$ export CFLAGS=-Wno-error=shorten-64-to-32
$ CONFIGURE_OPTS="--with-readline-dir=/usr/local --with-openssl-dir=`brew --prefix openssl`" RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 2.0.0-p0
$ brew unlink readline