pod 出错备忘
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 15 total gem(s) (Gem::LoadError)
from /System/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>'
查看 Ruby
版本:
$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
rvm install 2.3.0
升级 Ruby 2.3 仍有
问题,更新步骤:
1、 更新 gem ,国内需切换 gem source
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled --ruby --rails --trace
或 sudo gem update --system
- 切换
gem source
$ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
$ gem sources -l
*** CURRENT SOURCES***
https://ruby.taobao.org
2、 安装 cocoapods
$ sudo gem install cocoapods
$ pod setup
和安装过程是一样的,再次查看 pod
版本:
$ pod --version
.39.0