MacOS 10.12.1 + Xcode 8.1 installation Cocoapods 1.1.1

Source: Internet
Author: User
Tags install brew install cocoapods

Recently the company has just given a 27-inch imac,5k screen, this acid cool ~ ~, a new computer, unavoidable system upgrade, environment, when everything is ready, I will be ready to install cocoapods, however, all the previous tutorials have become useless ... However online a lot about MacOS Installation Cocoapods tutorial, dazzling, find a few good comprehensive look at the same time, combined with their own success examples, recorded ...

First of all, the computer is newly bought, of course, is completely not installed Cocoapods, the system is the latest MacOS 10.12.1,xcode 8.1, due to cocoapods1.1.1 's pit dad, first check their gem version and Ruby version ... Otherwise, the install will fail even if you replace the ruby source.

After Ruby-v is executed, the initial ruby version is 2.0.0,gem version 2.0.14.1

2.0 version seems to be unable to install, at least I myself in the execution of the sudo gem install cocoapods is a failure, so, first upgrade it!

The terminal performs the following code upgrade gem

sudo gem update--system

Execute the following code to upgrade Ruby to 2.2. Version 2:

The first step:

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

Part II:

SOURCE ~/.RVM/SCRIPTS/RVM

Step Three:

检查是否安装成功
Rvm-v

  结果 return rvm 1.27.0 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

Fourth Step:

RVM list known

After executing the above code, the following results appear, showing all available ruby versions, selecting the latest version 2.2 for the upgrade installation

And then execute

RVM Install 2.2.2

Be patient, because to install brew first, a bunch of the following will appear when the installation succeeds.

OK, set the new Ruby to the default,

RVM 2.2.2--default

Person after inputruby -v 显示的ruby版本是你安装后的新版本,说明ruby安装成功! 

Now we're going to change the ruby source.

Before has been used Taobao source, and now only found this and waste, information is too backward, had to use Cocoachina,

gem source -a https://gems.ruby-china.org/

再把旧的源移除
gem sources --remove https://rubygems.org/

保证只有一个china的源


完成之后,我们执行下列命令进行安装cocoapods!!

sudo gem install Cocoapods

The following information indicates that the installation was successful, otherwise please check if your ruby source and gem are upgraded successfully.

Check out the pod version:

yes! has been installed successfully, then use pod Setup to press ENTER, then point a cigarette, slowly wait for cocoapods installation is complete ...!

 

 

  

MacOS 10.12.1 + Xcode 8.1 installation Cocoapods 1.1.1

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.