Correctly reflect the version of ruby installed by rbenv.
--Installed with rbenv --Confirmed installed ruby --The pass is passing --rbenv init is described in ~ / .zshrc
The work up to this point is omitted because there are many good articles.
$rbenv versions
system
* 2.6.3 (set by /Users/.../.ruby-version)
2.6.4
Who is this .ruby-version?
Quote (when not switching with rbenv)
The version set by rbenv local is recorded in the .ruby-version file of the current directory, and as long as it is in that directory, it takes precedence over the version set by rbenv global.
From the above, the ruby version did not switch because the version recorded in ruby-version was prioritized. If you come this far, the goal is right there.
$rm .ruby-version
$rbenv global(local)Installed ruby version
$rbenv rehash
$ruby -v(It is good if the version is switched here)
Thank you for your hard work.
When not switching with rbenv Version does not switch in Ruby rbenv global 2.3.0
Recommended Posts