因爲博客遷移,移植一些原博客,寫做日期:2015/04/07
原文地址 http://www.icoding.net/rvm-is-not-a-function.htmlhtml
最近開始學習Ruby,但在安裝Ruby2.2的時候,出現了好多小問題,而後Google搜索了許多答案,費了很多時間,因此特別寫出來記錄一下,同時也但願可以幫助遇到相同問題的小夥伴。
由於我用的是Linuxmint操做系統,屬於Ubuntu系列。以前一直以爲這個發行版本可能不支持Ruby的高版本,但內心有種很不微妙的感受,遂決定解決這個問題。shell
安裝 RVM 後,執行rvm install 2.2.0命令,(若是安裝ruby2.2存在問題,請點擊這裏)下載併成功安裝Ruby2.2後,執行以下命令:ruby
~$ 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-terminabash
最後,祝君成功!學習