Created
February 14, 2010 09:29
-
-
Save cnruby/303928 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # 安装gem软件包rvm | |
$ sudo gem install rvm | |
$ rvm-install | |
$ vim ~/.profile #该文件名称不一定每个系统都相同。下面一行代码存放到该文件的最后一行,但是在其后不能够有空行!完成此操作以后,需要打开新的终端,看看是否出现错误。没有错误说明此操作正常。切记:下面的所有操作命令将在新终端窗口进行。 | |
if [[ -s ${HOME}/.rvm/scripts/rvm ]] ; then source ${HOME}/.rvm/scripts/rvm ; fi # 需要增加的代码 | |
$ # 安装Ruby1.9.1命令(第二行命令是因为第一行命令安装出现错误上进行的补救命令) | |
$ rvm install 1.9.1 | |
$ sudo $HOME/.rvm/rubies/ruby-1.9.1-p378/bin/gem install rake | |
$ # 使用Ruby1.9.1切换命令 | |
$ rvm 1.9.1 #打开新的终端还是Ruby 1.8.6 | |
$ which ruby #查看Ruby 1.9.1安装在哪里 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment