Quick install Ruby on Rails Concise guide _ruby topics

Source: Internet
Author: User
Tags curl administrator password ruby on rails

For new entry-level developers, how to install Ruby, Ruby Gems and Rails running environments can be a problem, and this page focuses on how to quickly install a ruby development environment with a plausible path.
The secondary installation method also applies to the product environment!
System Requirements

First determine the operating system environment, not recommended on Windows, so you need to use:

    • Mac OS X
    • Any Linux distributions (Ubuntu,centos, Redhat, ArchLinux ...)
    • The strong novice uses Ubuntu to dispense with unnecessary trouble!

The following area of code, with a $ beginning representation needs to be executed below the console (terminal) (excluding the $ symbol)
Step 0-Install the package required by the system

# for MAC 
# First install [Xcode] (http://developer.apple.com/xcode/) development tool, it will help you install the Unix environment needs of the development Kit
# then install [Homebrew] (http:// brew.sh)
ruby-e "$ (curl-fssl https://raw.github.com/mxcl/homebrew/go/install)"

Step 1-Install RVM

What RVM is doing here is not explained, and you will be able to figure it out later.

$ curl-l Https://get.rvm.io | Bash-s Stable

The period may ask you the sudo administrator password, as well as automatically installs the dependency package through the homebrew, waits for a period of time can successfully install good RVM.

Then, load the RVM environment (the new open termal do not have to do so, will automatically reload)

$ source ~/.RVM/SCRIPTS/RVM

Check to see if the installation is correct

$ rvm-v
RVM 1.22.17 (Stable) by Wayne E. Seguin <wayneeseguin@gmail.com> Michal Papis <mpapis@gmail.com> [https://rvm.io/]

Step 2-Install Ruby environment with RVM

$ RVM Install 2.0.0

Also continue to wait for the long download, the compilation process, when finished, Ruby, Ruby Gems is installed.
Step 3-Set Ruby version

RVM installed, you need to perform 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, provided you have the RVM install installed that version.

This time you can test if it's right

$ ruby-v
Ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]

$ gem-v
2.1.6

$ gem source-r https://rubygems.org/
$ gem source-a https://ruby.taobao.org

Step 4-Install the Rails environment

After the 3 steps above, the Ruby environment is installed, and then Rails is installed

$ gem Install Rails

Then test that the installation is correct

$ rails-v
Rails 3.2.13

Then start your ruby,rails trip.
Welcome to Ruby's world!
Other Resources

HTTPS://GITHUB.COM/HUACNLEE/INIT.D-Ubuntu Server Bulk script for rapid installation of production environments

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.