RVM 不是一个函数,使用“rvm use ...”选择红宝石将不起作用

RVM 不是一个函数,使用“rvm use ...”选择红宝石将不起作用

我正在尝试安装此处解释的话语但是命令

# Use installed ruby as default
rvm use 2.0.0 --default 

结果是:

discourse@ubuntu:~$ rvm use 2.0.0 --default

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.

我明白那个

For RVM to work properly, you have to set the 'Run command as login shell' checkbox on the Title and Command tab inside of gnome-terminal's Settings page.

正如这里解释的那样但我无法访问 GUI,因为我正在通过 ssh 安装到 ubuntu 服务器。如何在 gnome 中更改该设置?



编辑

根据 mpapis 的回答我运行了rvm get stable --auto-dotfiles,但仍然出现相同的错误。我在下面添加了输出。这是否告诉我需要修复什么?

discourse@ubuntu:/var/www/discourse$ rvm get stable --auto-dotfiles
Downloading https://get.rvm.io
Turning on auto dotfiles mode.
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Upgrading the RVM installation in /home/discourse/.rvm/
    Removing rvm PATH line from /home/discourse/.profile /home/discourse/.bashrc /home/discourse/.zshrc.
    Adding rvm PATH line to /home/discourse/.profile /home/discourse/.bashrc /home/discourse/.zshrc.
    Removing rvm loading line from /home/discourse/.profile /home/discourse/.zlogin.
    Adding rvm loading line to /home/discourse/.bash_profile /home/discourse/.zlogin.
Upgrade of RVM in /home/discourse/.rvm/ is complete.

# discourse,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
       Help RVM 2.0: https://www.bountysource.com/fundraisers/489-rvm-2-0

Upgrade Notes:

  * No new notes to display.

RVM reloaded!

答案1

这将起作用,手动将这些行添加到您的 ~/.bashrc 文件中

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

答案2

跑步:

rvm get stable --auto-dotfiles

确保你阅读了所有的输出 - rvm 会为你打印信息和警告,以便你可以修复任何无法自动修复的问题

答案3

在'.profile'中注释掉(或删除)export PATH="$PATH:$HOME/.rvm/bin"因为它已经在'.bashrc'文件中并移动[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"到'.bashrc'。

相关内容