gpt4 book ai didi

ruby - rbenv 工作但 ruby​​ 版本没有改变

转载 作者:数据小太阳 更新时间:2023-10-29 08:57:34 25 4
gpt4 key购买 nike

❯ rbenv version
system (set by /Users/eric.nguyen/.rbenv/version)

❯ rbenv local 2.4.2


❯ gem install bundler
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

❯ rbenv global 2.4.2

❯ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

❯ rbenv version
2.4.2 (set by /Users/eric.nguyen/.ruby-version)

❯ gem install bundler
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

❯ gem -v
2.0.14.1

Ruby 版本仍然是 2.0.0p648

我使用的是 macOS Sierra 10.12.6。
我已经完成了提到的所有事情 here

我已经完成了:

  1. rbenv 重新哈希
  2. eval "$(rbenv init -)" 放入我的 .zshrc 和 source ~/.zshrc
  3. $HOME/.rbenv/shims 放入 $PATH (/Users/eric.nguyen/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/eric.nguyen/Library/Android/sdk/tools:/Users/eric.nguyen/Library/Android/sdk/platform-tools:/Users/eric.nguyen/.rbenv/shims )

但它仍然没有改变 ruby​​ 版本。

最佳答案

重启我的电脑解决了这个问题。

❯ ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]


❯ gem -v
2.6.13

关于ruby - rbenv 工作但 ruby​​ 版本没有改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47094173/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com