LoginSignup
4
4

More than 5 years have passed since last update.

Rubyメモ

Last updated at Posted at 2014-09-05

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

参考

4
4
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
4
4