Final confirmation when ruby version does not switch

This goal

Correctly reflect the version of ruby installed by rbenv.

Assumed readership

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

If you still can't switch versions, have you completed the following steps?

$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.

Finally switch the ruby version

$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.

reference

When not switching with rbenv Version does not switch in Ruby rbenv global 2.3.0

Recommended Posts

Final confirmation when ruby version does not switch
Ruby version does not switch
Correspondence when Ruby version does not switch in rbenv
[Ruby on Rails] When parameter id acquisition does not work
Do not return when memoizing in Ruby
[NetBeans] Story when it does not start
When @Transactional of Spring Boot does not work
Does not recognize the library when implementing jcaptcha
Library not loaded when trying to upgrade the version of ruby and rails s
[Ruby] How to use rbenv (version `x.x.x'is not installed)
When Docker for Mac 2.4.0.0 does not reflect file changes
[Note] When the page access speed does not increase
When the server does not start with rails s
What to do if you installed Ruby with rbenv but the version does not change