2
0

More than 3 years have passed since last update.

【Mac】rbenv versionsとruby -vでバージョンが違う時の解決法

Posted at

ruby versionsの時

$ ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]

ruby -vの時

$ ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

Rubyのバージョンが違うことがわかります。
この問題解決に2時間くらいかかったので投稿しようと思います。

解決策

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

結論この3行を上から順番にターミナルに打つと問題解決できました。
めでたしめでたし

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