-
Notifications
You must be signed in to change notification settings - Fork 1.2k
rbenv
Daniel Lv edited this page May 3, 2014
·
1 revision
先安装 Xcode Command line tools:
$ xcode-select --install
安装 homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
安装 rbenv:
brew update
brew install rbenv ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
安装 Ruby 2.1.1:
rbenv install 2.1.1
小贴士: rbenv install -l
可以列出所有可用版本。
全域预设使用 Ruby 2.1.1:
rbenv global 2.1.1