为什么 rbenv 在 Mac OS Catalina 上不起作用 [英] Why rbenv does not work on Mac OS Catalina
问题描述
我正在尝试运行一个版本为 2.4.1
的 Ruby on Rails 项目,我的系统是 2.6.x
.我所做的是通过 Rbenv 安装旧版本的 Ruby 然后我执行了以下命令:
I'm trying to run a Ruby on Rails project which has the version 2.4.1
and my system is 2.6.x
.
What I did was install via Rbenv the old version of Ruby then I did the following commands:
rbenv global 2.4.1 -> to change global Ruby version
ruby -v
ruby 2.6.5p114
rbenv global
2.4.1
所以有一些问题,因为我想使用 2.4.1 但似乎不起作用.我无法启动捆绑包,因为它说我没有安装 2.4.1.
So there is something wrong as I would like to use 2.4.1 but seems not working that. I'm unable to start the bundle as it is saying I don't have 2.4.1 installed.
我需要一个 Mac OS Catalina 的解决方案,正如我在网上找到的那样,但没有任何效果并且无法启动项目.
I need a solution to Mac OS Catalina as I did as I found online but nothing works and cannot be started the project.
推荐答案
尝试 eval "$(rbenv init -)"
.如果这解决了您的问题,请将该行添加到您的 .bash_profile 或 ~/.zshrc(感谢@Agney,请参阅下面的评论)
Try eval "$(rbenv init -)"
. If that solves your problem, add that line to your .bash_profile or ~/.zshrc (Credits to @Agney, see comment below)
这篇关于为什么 rbenv 在 Mac OS Catalina 上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!