gpt4 book ai didi

ruby - 我在 Mac OS X 上收到 "RVM is not a function"错误,并且没有发布的解决方案有效

转载 作者:数据小太阳 更新时间:2023-10-29 06:35:12 27 4
gpt4 key购买 nike

我在 Mac OS x 10.8.2(“Mountain Lion”)上,我成功安装了 RVM 1.17.8 及其依赖项。我可以使用它来使用 rvm install 1.9.2 安装 Ruby 版本, 但我无法执行 rvm use <version>没有收到此错误:

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.

我在 ~/.bash_profile 中有以下内容,我已将其设置为运行,使用 source ~/.bash_profile ,每当启动终端窗口时:

export SVN_EDITOR=vim
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[ -r ~/.bashrc ] && source ~/.bashrc

我试过运行 source ~/.rvm/scripts/rvm ,它运行时没有返回错误,但是当我尝试使用 RVM 在终端 session 中设置 Ruby 版本时,我仍然收到“RVM 不是函数”错误。

我还尝试使用 rvm implode 卸载并重新安装 RVM .我的想法已经用完了,而且我似乎无法在网上找到更多的解决方案。帮忙?

最佳答案

确保您的 shell 初始化文件设置正确:

rvm get head --auto-dotfiles

然后转到您的终端模拟器首选项并启用login shell,有时它需要使用/bin/bash --login。还要确保在更改设置后完全关闭终端并重新打开它。

关于ruby - 我在 Mac OS X 上收到 "RVM is not a function"错误,并且没有发布的解决方案有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14289217/

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