列出ruby版本

console:~$ rvm list

rvm rubies

ruby-2.0.0-p481 [ i686 ]

# => - current
# =* - current && default
#  * - default

尝试使用特定版本的ruby

console:~$ rvm use 2.0.0

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.

当前回答

看起来你的rvm没有加载”。bash_profile正确”。我已经在MAC OS X或Ubuntu 14.04中通过打开终端来修复它,并写道:

source ~/.rvm/scripts/rvm

其他回答

输入bash——从终端登录。然后给rvm使用2.0.0

     Usually this is caused by shell initialization files. Search for PATH=... entries.
     You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
     To fix it temporarily in this shell session run: rvm use ruby-2.6.5
     To ignore this error add "rvm_silence_path_mismatch_check_flag=1" to your "~/.rvmrc" file.

我的环境是OSX优胜美地。有同样的问题....通过添加以下内容来解决

1)编辑并添加以下一行到.bash_profile文件。

[[-s "$HOME/。Rvm /scripts/ Rvm "]] &&。“$ HOME / .rvm /脚本/区”

2)重启终端,重试RVM命令

对我来说,在Ubuntu(18.08)中,我在.bashrc中添加了下面的行,它可以工作。

 source /home/username/.rvm/scripts/rvm

请加上这一行。

从新的Ubuntu 16.04安装

1)终端=>编辑=>配置文件首选项

2) Command Tab =>检查作为登录shell的Run命令

3)关闭终端,重新打开终端

rvm --default use 2.2.4