LoginSignup
4
2

More than 5 years have passed since last update.

macOSにrubyをインストール

Last updated at Posted at 2017-09-02

Homebrewのインストール

Homebrewがインストールされていなかったのでインストール

rbenvとruby-buildのインストール

$ brew update
$ brew install rbenv ruby-build
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv --version
rbenv 1.1.1

rubyのバージョンを選択

rbenv install -l
rbenv install 2.4.0

バージョンを確認

$ rbenv versions
* system (set by /Users/hogehoge/.rbenv/version)
2.4.0

macのデフォで入っているバージョンなので、変更する

とりあえず環境全体のバージョン指定

rbenv global 2.4.0

$ rbenv versions
system
* 2.4.0 (set by /Users/tomoaki/.rbenv/version)

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