解决LinuxMint17 切换到Ruby2.2版本不成功问题

611 查看

由于博客迁移,移植一些原博客,写作日期:2015/04/07
原文地址 http://www.icoding.net/rvm-is-not-a-function.html

最近开始学习Ruby,但在安装Ruby2.2的时候,出现了好多小问题,然后Google搜索了许多答案,费了不少时间,所以特别写出来记录一下,同时也希望能够帮助遇到相同问题的小伙伴。
因为我用的是Linuxmint操作系统,属于Ubuntu系列。之前一直觉得这个发行版本可能不支持Ruby的高版本,但心里有种很不微妙的感觉,遂决定解决这个问题。

安装 RVM 后,执行rvm install 2.2.0命令,(如果安装ruby2.2存在问题,请点击这里)下载并成功安装Ruby2.2后,执行如下命令:

~$ rvm use 2.2.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.

按照提示我们只需要执行命令bash --login,然后在执行rvm use 2.2.0 --default即可。如果想知道为什么,可以点击这个链接https://rvm.io/integration/gnome-termina

最后,祝君成功!