RVM不能通过SSH工作(作为一项功能) [英] RVM won't work over SSH (as a function)

查看:88
本文介绍了RVM不能通过SSH工作(作为一项功能)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Debian 6服务器上安装了RVM,一开始没有任何问题。但是,在设置完所有内容之后,我无法在终端中运行RVM。我输入 rvm use 时得到的消息是:

I just installed RVM on a Debian 6 server, without having any problem in the beginning. However after everything is set up, I can't run RVM in the terminal. The message I get when I type rvm use is:

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.

我通过SSH登录并找不到解决此问题的解决方案。在 rvm installation not working:RVM is not a function ; 他们设法解决了这个问题,但不是为了解决SSH问题。

I am logging in via SSH and can´t find a solution for this problem. In "rvm installation not working: "RVM is not a function"" they managed to solve the problem but not for SSH.

推荐答案

运行:

rvm get stable --auto-dotfiles

它会从shell初始化文件中删除并重新添加rvm行

it will remove and re-add rvm lines from shell initialization files

用于 ssh 连接你需要将你的shell设置为 bash (首选)或 zsh ,你可以检查你的当前shell:

for ssh connections to work you need to set your shell as bash(preferred) or zsh, you can check your current shell with:

getent passwd $USER | awk -F: '{print $NF}'

如果不是 bash / zsh 改变它:

and if it is not bash/zsh change it with:

chsh $USER --shell `which bash`

这篇关于RVM不能通过SSH工作(作为一项功能)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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