初级Luna OS中的RVM

bul*_*eam 8 ruby linux terminal rvm

当尝试在Elementary Luna OS'终端中使用它时,我收到错误"RVM不是函数".这里有一个解释http://rvm.io/integration/gnome-terminal,但是Elementary OS'terminal没有设置菜单(!) - 那么如何解决这个操作系统?

Gna*_*gno 9

只需打开一个终端并粘贴即可:

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)

然后执行:

source ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)

它应该工作

  • 当您打开bash(假设您当然正在使用bash)到.bash_profile文件时,第一行是附加配置以加载rvm.第二个命令只是重新加载.bash_profile文件而不注销并再次登录 (2认同)

bio*_*net 1

您应该能够通过将其附加到您的~/.bashrc文件来近似该设置(rvm.sh 可能不是正确的名称,但它是类似的东西)。您可能需要登录并退出才能生效。

source /etc/profile.d/rvm.sh
Run Code Online (Sandbox Code Playgroud)

或者添加此内容,其中应包含 /etc/profile.d/ 下的所有内容。它应该与检查 gnome-terminal 中的设置非常相似:

source /etc/profile
Run Code Online (Sandbox Code Playgroud)