rvm 安装不起作用:“RVM 不是功能"; [英] rvm installation not working: "RVM is not a function"

查看:41
本文介绍了rvm 安装不起作用:“RVM 不是功能";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 RVM,但无法使其工作.我的 .profile 文件末尾有这样一行:

I just installed RVM, but can't make it work. I have such line at the end of my .profile file:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

我尝试运行 source .profile 并重新启动终端,但是当我运行 rvm use 1.9.2 时,我得到:

I tried to run source .profile and restarting terminal, but still, when I run rvm use 1.9.2 I'm getting:

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

我的系统是 Ubuntu 11.10.

My system is Ubuntu 11.10.

推荐答案

您没有使用登录 shell.

You are not using an login shell.

启用登录标志的过程在这里中描述,还有一些细节登录 shell 可以在这里找到.

The process of enabling the login flag is described here, also some details on what a login shell is can be found here.

因此,您需要在 Gnome 终端的设置中检查选项 作为登录 shell 运行".设置此标志后需要打开新终端.

Thus, you need to check the option "Run as login shell" in the Gnome terminal's settings. It is required to open new terminal after this setting the flag.

有时需要将命令设置为/bin/bash --login.

Sometimes it is required to set the command to /bin/bash --login.

对于远程连接,了解运行交互式ssh会话和执行单个命令之间的区别很重要.

For remote connections it is important to understand the differene between running interactive ssh session and executing single commands.

在运行 ssh server 然后以交互方式使用服务器时,默认情况下您使用的是登录 shell,这一切都很好,但是对于 ssh server "command",您不是使用登录 shell 并且需要使用 ssh server 'bash -lc "command"' 运行它.

While running ssh server and then working with the server interactively you are using login shell by default and it's all fine, but for ssh server "command" you are not using login shell and it would be required to run it with ssh server 'bash -lc "command"'.

任何远程调用都可能出现与使用 ssh 执行单个命令相同的问题.

Any remote invocation can have the same problem as executing single command with ssh.

这篇关于rvm 安装不起作用:“RVM 不是功能";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆