System Requirements
First determine the operating system environment, it is not recommended to engage in Windows, so you need to use:
- Mac OS X
- Any Linux distribution (Ubuntu,centos, Redhat, ArchLinux ...)
Strong novice use Ubuntu saves unnecessary hassle!
The following code area, with a $ first representation, needs to be performed under the Console (terminal) (not including the $ symbol)
Step 0-Install the package required by the system
# first install [Xcode] (http://developer.apple.com/xcode/) development tool, it will help you install the UNIX environment needs the development package "$ (Curl-fssl https:// Raw.github.com/mxcl/homebrew/go/install)"
Step 1-Install RVM
What is RVM do not explain here, you will slowly understand the back.
$ curl-l Https://get.rvm.io | Bash-s Stable
You may be asked for a sudo administrator password, and youhomebrewcan install the RVM successfully after a period of time by installing the dependent packages automatically.
Then, load into the RVM environment (new open termal will not do so, will automatically reload)
SOURCE ~/.RVM/SCRIPTS/RVM
Check to see if the installation is correct
(Stable[https://rvm.io/]
Step 2-Install the Ruby environment with RVM
$ RVM Install 2.0.0
Also continue to wait for a lengthy download, the compilation process, after completion, Ruby, Ruby Gems is installed.
Step 3-Set up Ruby version
After the RVM is installed, you need to execute the following command to set the specified version of Ruby to the system default version
$ RVM 2.0.0--default
Also, you can use a different version number if you have a RVM install installed that version
This time you can test whether it is correct
(2013-06-27 revision 41674[x86_64-darwin13.0.0]$ gem-v2.1.6source-r https://rubygems.org/ Source-a https://ruby.taobao.org
Step 4-Install the Rails environment
After the 3 steps above, the Ruby environment is installed, and the next step is to install Rails
$ gem Install Rails
Then test that the installation is correct
$ rails-vrails 3.2.13
Then start your ruby,rails trip.
Welcome to the world of Ruby!
Other resources
HTTPS://GITHUB.COM/HUACNLEE/INIT.D-Rapid installation of Ubuntu Server batch scripts for production environments
Transferred from: Https://ruby-china.org/wiki/install_ruby_guide
How to quickly and correctly install Ruby, Rails running environment