rbenv asing for 2.7.0 when version 3.0.3 is installed #1959
-
Hello Everyone! here are my terminal logs:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, I spotted the problem by looking at this line:
It looks like you have a You should "Local" ruby version are meant primarily for project directories. For example, you can run |
Beta Was this translation helpful? Give feedback.
-
Hello Mislav,
Thanks for your detailed and clear answer. I am wondering how this file could have been created 😉
Anyway, I found a (bad) solution in opening this file and changing the line by 3.0.3.
But as you say it's an absurd idea to have a local version in my home directory, so I will remove it!
Thanks again,
C
…________________________________
De : Mislav Marohnić ***@***.***>
Envoyé : lundi 18 avril 2022 10:00
À : rbenv/ruby-build ***@***.***>
Cc : Cécile Rougnaux ***@***.***>; Author ***@***.***>
Objet : Re: [rbenv/ruby-build] rbenv asing for 2.7.0 when version 3.0.3 is installed (Discussion #1959)
Hi, I spotted the problem by looking at this line:
rbenv: version `2.7.0' is not installed (set by /Users/rougnaux/.ruby-version)
It looks like you have a /Users/rougnaux/.ruby-version file, which sets the "local" Ruby version to 2.7.0. This was likely created by running rbenv local 2.7.0. This is probably not what you want, since any sub-directory of /Users/rougnaux (basically, everything under your user) will inherit that version, but you want your "global" version to be 3.0.3.
You should rm /Users/rougnaux/.ruby-version to fix this.
"Local" ruby version are meant primarily for project directories. For example, you can run rbenv local 2.7.0 to set it as a local Ruby version while in the directory /Users/rougnaux/projects/myapp. Then, everything under that directory will use Ruby 2.7.0. However, it's probably not a good idea to run rbenv local ... in your home directory.
—
Reply to this email directly, view it on GitHub<#1959 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AL2266N2UA6RJQEZDIJX6NDVFUXFRANCNFSM5TTVXHCQ>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi, I spotted the problem by looking at this line:
It looks like you have a
/Users/rougnaux/.ruby-version
file, which sets the "local" Ruby version to2.7.0
. This was likely created by runningrbenv local 2.7.0
while in your home directory. This is probably not what you want, since any sub-directory of/Users/rougnaux
(basically, everything under your user) will inherit that version, but you want your "global" version to be3.0.3
.You should
rm /Users/rougnaux/.ruby-version
to fix this."Local" ruby version are meant primarily for project directories. For example, you can run
rbenv local 2.7.0
to set it as a l…