【问题标题】:`-bash: rbenv: command not found` comes up every time I open a terminal window. How do I fix this?每次打开终端窗口时都会出现`-bash: rbenv: command not found`。我该如何解决?
【发布时间】:2013-07-18 02:07:08
【问题描述】:

我尝试使用 rbenv 安装 rails,但没有成功。然后我卸载了 rbenv 并用 rvm 安装了 rails。现在每次我打开终端窗口时,我都会得到关注

 Last login: Wed Jul 17 21:59:43 on ttys001
 -bash: rbenv: command not found
 -bash: rbenv: command not found
 name-Mac-mini:~ name$

当我使用自制软件卸载时,我得到了

$ brew uninstall rbenv
Error: No such keg: /usr/local/Cellar/rbenv

我有运行 Mountain Lion 10.8.4 的 mac-mini。关于如何解决此问题的任何想法?

【问题讨论】:

    标签: macos homebrew rbenv


    【解决方案1】:

    我遇到了完全相同的问题,这是我的解决方法。就像zchrykng 说的,这是我的.bash_profile 中的一行。

    运行 $ sudo pico .bash_profile 打开文件进行编辑。 (您必须输入密码)

    我不得不删除文档底部重复两次的eval "$(rbenv init -)"。删除这些行后,保存,您应该不会再看到错误了。

    【讨论】:

      【解决方案2】:

      由于无法查看您的 .bashrc.bash_profile 文件,我猜您在其中一个文件中有一行应该从 rbenv 加载内容。

      我会检查那里是否有可能正在加载的东西。

      【讨论】:

      • 谢谢,我找到了一些 rbenv 引用并将它们注释掉。终端现在加载正常。
      猜你喜欢
      • 2022-10-15
      • 1970-01-01
      • 2014-10-07
      • 1970-01-01
      • 2013-01-25
      • 2019-12-11
      • 2022-10-16
      • 2023-01-29
      • 2020-08-18
      相关资源
      最近更新 更多