Cocoapods installation (This is really a magical thing, each installation method is not the same, and very prone to a variety of errors)

Source: Internet
Author: User

Before the article started, it is recommended to install a plug-in showing the speed, or you do not know whether there is no download, but also make life a little look forward

1. For well-known reasons (my dang's behavior is really disappointing), change the ruby image source first

$ gem Sources--remove https://rubygems.org/

$ gem sources-a https://ruby.taobao.org/

$ gem sources-l

These three steps are generally not wrong.

2. Start the installation of Cocoapods

$ sudo gem install-n/usr/local/bin cocoapods //os x 10.11 System after reference other information

Now we have the first error:error:error installing Cocoapods:activesupport requires Ruby version >= 2.2.2.

It means you have to upgrade Ruby to 2.2.2 or more, we use RVM to install, so also to install RVM

$ curl-l Get.rvm.io | bash-s stable   //back should have two lines, if not successful search "RVM installation"

After successful prompt: * to start using RVM u need to run ' SOURCE/USERS/YUEBIN/.RVM/SCRIPTS/RVM', meaning to let you follow this path to find this program, Open and run, OK

$command RVM Install 2.3.0  //Start the installation ruby2.3.0, start reading the download progress, the file only about 12 trillion, but the download speed extremely easy to fail , I tried 5, 6 times to fix, need patience

The success will be a bunch of hints: if you see a line that is the Install of ruby-2.3.0-#complete ; The new Ruby version is ready.

$RVM use 2.3.0 //ruby can co-exist in multiple versions, and after downloading, you can $ruby-V with commands, and check the current Ruby version

3. Start the installation again Cocoapods

$ sudo gem install-n/usr/local/bin cocoapods  //Go back to the beginning of the wrong place, re-execute, will start to download more than 100 trillion files, start and so on

$pod Setup //Successful green font display:Setup completed here Cocoapods has been installed, you can use the $pod search "FMDB" test

Cocoapods installation (This is really a magical thing, each installation method is not the same, and very prone to a variety of errors)

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.