almost 4 years ago

系統:

Mac OS X Yosemite 10.10.1
Ruby 2.1.5
Rails 4.1.8

相關連結

rbenv ( https://github.com/sstephenson/rbenv )

原因

EDAP 文章 ( http://edapx.com/2013/05/23/switching-from-rvm-to-rbenv/ )

設定步驟如下

1. 移除 rvm

$ rvm implode

2. 使用 homebrew 安裝 rbenv

$ brew update
$ brew install rbenv ruby-build

新增 settings

$ echo 'export RBENV_ROOT=/usr/local/var/rbenv' >> ~/.bash_profile
$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile

3. 更新 rbenv

$ brew update
$ brew upgrade rbenv ruby-build

4. 安裝 ruby

# list all available versions:
$ rbenv install -l

# install a Ruby version:
$ rbenv install 2.1.5

# use global set ruby version used in all shells
$ rbenv global 2.1.5

$ rbenv rehash

5. 安裝及更新 gems 套件

$ gem update --system
$ gem update
$ gem install bundle 
← Post 管理 - part 1 - 基本設定 Template 從 haml 轉換到 slim →
 
comments powered by Disqus