Skip to content

Instantly share code, notes, and snippets.

@cnruby
Created February 14, 2010 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cnruby/303933 to your computer and use it in GitHub Desktop.
Save cnruby/303933 to your computer and use it in GitHub Desktop.
$ # 安装gem软件包rvm
$ sudo gem install rvm
$ rvm-install
$ vim ~/.profile #该文件名称不一定每个系统都相同。下面一行代码存放到该文件的最后一行,但是在其后不能够有空行!完成此操作以后,需要打开新的终端,看看是否出现错误。没有错误说明此操作正常。切记:下面的所有操作命令将在新终端窗口进行。
if [[ -s ${HOME}/.rvm/scripts/rvm ]] ; then source ${HOME}/.rvm/scripts/rvm ; fi # 需要增加的代码
$ # 安装Readline
$ rvm package install readline
$ # 安装Ruby 1.8.7
$ rvm install 1.8.7 -C --enable-shared,--with-readline-dir=$HOME/.rvm/usr
$ # 使用Ruby1.8.7切换命令
$ rvm 1.8.7 #打开新的终端还是Ruby 1.8.6
$ which ruby #查看Ruby 1.8.7安装在哪里
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment