Cocoapods Version Upgrade

Source: Internet
Author: User
Tags versions install cocoapods

After upgrading OS X El Capitan, Time Machine recovery, and then because of the encounter octopress unable to update the blog problem, a toss octopress adaptation OS x El Capitan, but things are not so simple, and throw a problem.

As usual, use Cocoapods to execute commands:

$ pod Install

#输出信息
/system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/ Dependency.rb:296:in ' to_specs ': Could not find ' cocoapods ' (>= 0) among-total gem (s) (gem::loaderror)
    From/sys Tem/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in ' To_spec '
    From/system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_ Gem.rb:47:in ' Gem '
    from/usr/local/bin/pod:22:in ' <main> '

To view the Ruby version:

$ ruby-v
Ruby 2.2.3p173 (2015-08-18 revision 51636) [X86_64-DARWIN14]

It seems to be the problem of upgrading Ruby 2.2.3, update the next Cocoapods, update the steps:

1, update gem, domestic need to switch gem source

$ sudo gem update--system
Toggle Gem Source
$ gem Sources--add https://ruby.taobao.org/--remove https://rubygems.org/

or sudo gem install-n/usr/local/bin Coco Apods--pre
$ gem sources-l
* * * Current sources***

https://ruby.taobao.org

2, Installation Cocoapods

$ sudo gem install cocoapods
$ pod Setup

And the installation process is the same, check the pod version again:

$ pod--version

0.39.0

Fix It ~
Original address: http://www.jianshu.com/p/82a6d6c7b000

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.