Skip to content

Instantly share code, notes, and snippets.

@tomoima525
Created March 12, 2014 00:21
Show Gist options
  • Save tomoima525/9498013 to your computer and use it in GitHub Desktop.
Save tomoima525/9498013 to your computer and use it in GitHub Desktop.
macにhomebrewからrbenv ruby rails導入 ref: http://qiita.com/tomoima525/items/b3fb06a95efebb848d03
~ $ brew update
Updated Homebrew from a0b1aab2 to 51a9003a.
~ $ brew install rbenv
==> Downloading https://github.com/sstephenson/rbenv/archive/v0.4.0.tar.gz
######################################################################## 100.0%
==> Caveats
To use Homebrew's directories rather than ~/.rbenv add to your profile:
export RBENV_ROOT=/usr/local/var/rbenv
To enable shims and autocompletion add to your profile:
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
==> Summary
🍺 /usr/local/Cellar/rbenv/0.4.0: 31 files, 152K, built in 5 seconds
~ $ echo 'export RBENV_ROOT=/usr/local/var/rbenv' >> ~/.bash_profile
~ $ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi'>>~/.bash_profile
~ $ source ~/.bash_profile
~ $ rbenv install 2.1.1
~ $ rbenv rehash
~ $ rbenv global 2.1.1
~ $ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
~ $ gem install rails
~ $ rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment