Rubyメモ
Macとrbenvの場合。
Rubyのアプリを最新のバージョンで動かす賢いやり方
brew update
brew install rbenv
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bashrc
brew install ruby-build
brew install rbenv-gemset # bundleでpathを指定してればいらない?
brew install rbenv-gem-rehash
brew install rbenv-binstubs
rbenv install 2.1.2
rbenv global 2.1.2
gem update
gem install bundler
bundle install --path=vendor --binstubs=vendor/bin
Rubyやライブラリを根こそぎ最新にアップデート
brew doctor
brew update
brew upgrade rbenv
brew upgrade ruby-build
rbenv install --list
rbenv install 2.0.0-p481
rbenv install 2.1.2
rbenv versions
rbenv global 2.1.2
gem list
gem update
bundle show
cp Gemfile.lock Gemfile.lock.backup
bundle update
Ruby環境の確認
gem env
bundle config
今の環境でどのbinやgemが使われてるか調べる
rbenv which pry
bundle show pry