简体   繁体   English

ruby 版本未使用 rbenv 更新

[英]ruby version is not updating with rbenv

It seems that RBENV_VERSION is set to 3.0.1似乎 RBENV_VERSION 设置为 3.0.1

rbenv versions
system
2.6.5
2.7.3
* 3.0.1 (set by RBENV_VERSION environment variable)

but I cannot find the specific definition in to .zshrc file.但我在.zshrc文件中找不到具体的定义。 Where and when does this environment variable can be set?何时何地可以设置此环境变量?

For projects you should be able to specify a ruby version with the .ruby-version file.对于项目,您应该能够使用.ruby-version文件指定 ruby​​ 版本。

For the global version it can be in:对于全球版本,它可以在:

  • ~/.rbenv/version
  • RBENV_VERSION variable RBENV_VERSION变量

IF you've followed the install instructions you should have run echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc have rbenv should be handling this.如果您已按照安装说明进行操作,则应该运行echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc .zshrc 应该让 rbenv 处理此问题。

rbenv should then be reading the global version from the ~/.rbenv/version file.然后 rbenv 应该从~/.rbenv/version文件中读取全局版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM