LoginSignup
4
0

More than 5 years have passed since last update.

rbenvで.ruby-versionに書いてあるバージョンのRubyをインストールする

Posted at

こんなにシンプルなのに2回も方法を忘れてしまったのでちゃんと文字に起こす

$ ls ./.ruby-version
.ruby-version

$ cat ./.ruby-version
2.4.4

$ rbenv install
ruby-build: use openssl from homebrew
Downloading ruby-2.4.4.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.4.tar.bz2
Installing ruby-2.4.4...
ruby-build: use readline from homebrew
Installed ruby-2.4.4 to /Users/naari3/.rbenv/versions/2.4.4

バージョン番号を指定しない場合、カレントディレクトリにある.ruby-versionsの値をバージョン番号として見てくれる

カレントディレクトリに.ruby-versionがない場合は~/に辿り着くまで親のディレクトリを走査していく

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