|
1. First, the use of apt-get, you must first update, or some of the reservoir is not installed on the.
$ Sudo apt-getupdate
$ Sudo apt-get install -y build-essential openssl curl libcurl3-dev libreadline6 libreadline6-dev git zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf automake libtool imagemagick libmagickwand-dev libpcre3-dev libsqlite3-dev Libmysql-ruby libmysqlclient-dev
2. Install RVM
$ Curl -Lhttps: //get.rvm.io | bash -s stable
This step is not the following, to logout again
$ Source ~ / .rvm / scripts / rvm
Then installed rvm
$ Rvm -v3. Install Ruby
The first implementation of what, or the following process can not run.
$ Rvm autolibs enable The following optional step, if it is in their own virtual machine or domestic server will be added, the foreign VPS what is not needed. Function is to change the source of rvm Taobao provided the source.
$ Sed -i .bak 's! Ftp.ruby-lang.org/pub/ruby! Ruby.taobao.org/mirrors/ruby!' $ Rvm_path / config / db Then install
$ Rvm pkg install readline
$ Rvm install 2.0.0 --with-readline-dir = $ rvm_path / usr Finally, set the version of ruby
$ Rvm 2.0.0 --default
Well, look at the results
$ Ruby -v
Ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
$ Gem -v
2.0.34. Gem allocation of the source, but also domestic foreign optional
$ Gem source -r https://rubygems.org/$ gem source -a http://ruby.taobao.org |
|
|
|