LoginSignup
5
5

More than 5 years have passed since last update.

MavericksにrbenvでRubyをインストールする

Last updated at Posted at 2014-05-29

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とか他にも何かした記憶があるけど、今回は少し手順が減ってた。
公式のプラグインも使ってみた。

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5