Install Ruby in iOS Mac

Source: Internet
Author: User
Tags install homebrew

Install Ruby in iOS Mac

A series of questions raised by EasyIOS: the installation and use of CocoaPods in the previous article explains why cocoapods is used, but cocoapods needs a Ruby environment to be installed, to install the Ruby environment, you must first install Xcode (because of the xcode development tool, which helps us install the Development Kit required by the Unix environment) and then install homebrew. Next, you need to install RVM and finally install the Ruby environment.


The following describes how to install CocoaPots:


Xcode> homebrew> RVM> Ruby> CocoaPats;


This article explains how to install CocoaPats in Ruby. For details about installing CocoaPats after installing Ruby, refer to the cococoapats reposted in my previous article;

What are the top English letters and nouns mentioned above? (in fact, I don't understand them at all. They are all from Baidu. My google has been unavailable for a few days ):

Xcode

Not to mention Xcode.

Homebrew

Homebrew is a package manager used to install UNiX tools (such as wget) that are not available on OS x on mac (I don't know what wget is), but as a rookie, as long as you know that it is like Windows's 350 software manager, it is used to install some software.

Http://brew.sh/index_zh-cn.html

RVM

Rvm

Full name

Ruby Version Manager

Rvm

Full name

Ruby Version Manager

RVM, short for Ruby Version Manager, is a very useful Ruby Version and Installation tool. Is a tool used to install and control the Ruby version. Ruby

Ruby is an object-oriented scripting language that is easy to use and powerful. Good cross-platform and portability. It is actually a scripting language.

CocoaPats

This item looks quite practical. View my reposted blog: Click to open the link


The following describes the installation problems:

All these tools are installed using command lines on the terminal. First, choose finder> Application> utility> terminal.

First, install homebrew:

The method for installing homebrew is very simple. Open the official website and run the following installation command:


Copy this command to the terminal and press Enter. In the middle, press enter to continue and enter the password.

Detailed installation steps can refer to: http://blog.csdn.net/maojudong/article/details/7918291 installation instructions refer to the official website, operations can refer to the blog to see.

RVM Installation

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

During this period, you may be asked about the sudo administrator password and automatically install the dependency package through homebrew. After a while, you can successfully install RVM. Then, load the RVM environment (New Termal does not need to be done, it will automatically reload)

$ source ~/.rvm/scripts/rvm

Check whether the installation is correct

$ rvm -vrvm 1.22.17 (stable) by Wayne E. Seguin 
 
  , Michal Papis 
  
    [https://rvm.io/]
  
 

InstallRuby

$ rvm install 2.0.0

We will also continue to wait for a long download. After the compilation process is completed, Ruby and Ruby Gems will be installed.

ManagementRubyVersion

After the RVM is installed, You need to execute the following command to set the Ruby of the specified version to the default version of the system.

$ rvm 2.0.0 --default

You can also use other versions, provided that you have installed the version with rvm install.

At this time, you can test whether it is correct.

$ ruby -vruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]$ gem -v2.1.6$ gem source -r https://rubygems.org/$ gem source -a https://ruby.taobao.org

The article references the blog of many bloggers: https://ruby-china.org/wiki/install_ruby_guide
Http://blog.csdn.net/delphiwcdj/article/details/19679891
.

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.