LoginSignup
1
0

More than 5 years have passed since last update.

新端末のRuby versionを上げた日

Last updated at Posted at 2018-09-07

rbenvでversion管理する

$brew install rbenv ruby-build

bash_profileに書き込み、読み込ませる。

$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile

キチンと入ったか確認

$rbenv install --list
  1.8.5-p52
  1.8.5-p113
  1.8.5-p114
  1.8.5-p115
  1.8.5-p231
  1.8.6
             …
             …

18/09時点では最新版の2.5.1を入れます。

rbenv install 2.5.1

確認します。

$ rbenv versions
* system (set by /Users/hdymacuser/.rbenv/version)
  2.5.1

適用します

$ rbenv global 2.5.1
$ rbenv rehash
$ ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin16]

Success!

参考:https://numb86-tech.hatenablog.com/entry/2018/06/26/111619

1
0
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
1
0