Ruby Environment installation under IOS Mac system

Source: Internet
Author: User
Tags install homebrew administrator password install cocoapods

A series of questions elicited by Easyios: the previous Cocoapods installation and use tutorial in the reprint explains why you should use Cocoapods, but to install cocoapods requires a ruby environment, Installing the ruby environment first requires the installation of Xcode (because of the Xcode development tool, he helps us install the development packages needed for the UNIX environment) and then needs to install homebrew. Next you need to install RVM finally install ruby environment

Here's the order of installing cocoapots:

xcode->homebrew->rvm->ruby->cocoapats;

This article explains how to install the part of Ruby, on the installation of Ruby and then install cocoapats parts Please see my previous article reproduced cocoapats;

The following is said above the tall on the English letter noun is why (in fact, I do not understand, are Baidu out, my google these days are not used):

Xcode

Xcode doesn't have to say.

Homebrew

Homebrew is a package manager that installs some UNIX tools (such as wget) that are not available on the Mac (wget I don't know what it is), but as a rookie, just know it's like a window's 350 software manager to install some software.

Official website: http://brew.sh/index_zh-cn.html

RVM

Rvm

Full Name

Ruby Version Manager

Rvm

Full Name

Ruby Version Manager

RVM Full name Ruby version Manager, is a very useful Ruby edition as well as installation tools. is the tool used to install and control the Ruby version.

Ruby

Ruby is an object-oriented scripting language that is simple to use and powerful. Can cross platform and portability good and so on. is actually a scripting language.

Cocoapats

This thing looks quite practical. See my reproduced Blog: Click to open the link

Here are the installation questions:

Installing these tools is all done in the terminal with the command line. First, you need the finder-> application---utility--terminal.

The first is the installation of homebrew:

The method of installing homebrew is very simple, open the official website, there is an installation command below:

Copy this instruction to the terminal on the line to enter, in the middle need to return to continue, input password.

Detailed installation steps can refer to: http://blog.csdn.net/maojudong/article/details/7918291 installation Command Reference website, the operation can refer to the blog to see.

Installation of RVM

?
1 $ curl -L https://get.rvm.io | bash -s stable

You may be asked for the sudo administrator password and automatically install the dependency package through homebrew, waiting for a period of time before you can successfully install the RVM. Then, load into the RVM environment (new open termal will not do so, will automatically reload)

?
1 $ source ~/.rvm/scripts/rvm

Check to see if the installation is correct

?
12 $ rvm -vrvm 1.22.17(stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]</[email protected]>

installation Ruby

?
1 $ rvm install 2.0.0

Also continue to wait for a lengthy download, the compilation process, after completion, Ruby, Ruby Gems is installed.

Management 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

?
1 $ 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

?
123456 $ 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

Article refer to the blog of many bloggers: Https://ruby-china.org/wiki/install_ruby_guide
http://blog.csdn.net/delphiwcdj/article/details/19679891
such as

Ruby Environment installation under IOS Mac system

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.