0
0

More than 3 years have passed since last update.

MacOSにrvmで最新のrubyをインストールする

Last updated at Posted at 2019-11-03

rvmを最新版にする

rvm get latest

インストール可能なRubyを確認

rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.10]
[ruby-]2.3[.8]
[ruby-]2.4[.6]
[ruby-]2.5[.5]
[ruby-]2.6[.3]
[ruby-]2.7[.0-preview1]
ruby-head

ruby 2.7をインストールします。

ruby install ruby-2.7

インストール時にエラーが発生

Checking requirements for osx.
Installing requirements for osx.
Updating system...........................................................................................................................................Failed to update Homebrew, follow instructions at

    https://docs.brew.sh/Common-Issues

and make sure `brew update` works before continuing.

Error running 'requirements_osx_brew_update_system ruby-2.7'
Requirements installation failed with status: 1.

どうやらhomebrewが古かった様なのでアップデートします。

brew update

fatal: could not read Username for 'https://github.com': terminal prompts disabled
Error: homebrew/homebrew-dupes does not exist! Run 'brew untap homebrew/homebrew-dupes'

存在しないリポジトリをtapしてるからuntapしてくださいと
親切に教えてくださっているので、untapします。

brew untap homebrew/homebrew-dupes
Untapping homebrew/dupes...
Untapped (111 files, 253.6KB).

問題が解決したので再度ruby-2.7をインストールします。

rvm install ruby-2.7
.
.
.
Install of ruby-2.7.0-preview1 - #complete 

rvm listでインストールされていることを確認して完了です。

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