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