Homebrewを入れるところまでは特に代わり映えしないので省略。
必要なライブラリをインストール
brew install openssl
brew install readline
rbenvとruby-buildをインストール
brew install rbenv ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
rbenv install -l
rbenv rehashを自動化
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
Bundlerはどのバージョンでもインストール
git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems
echo "bundler" >> ~/.rbenv/default-gems
ドキュメントはダウンロードしない
echo "install: --no-ri --no-rdoc" >> ~/.gemrc
echo "update: --no-ri --no-rdoc" >> ~/.gemrc
Rubyをインストール
CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p481
rbenv global 2.0.0-p481
ruby -v
bundle
以前はbrew link --forceとか他にも何かした記憶があるけど、今回は少し手順が減ってた。
公式のプラグインも使ってみた。