How to quickly and correctly install Ruby, Rails running environment

Source: Internet
Author: User


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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.