当我运行pod setup
和pod install
我收到以下错误:
/Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'cocoapods' (>= 0) among 109 total gem(s) (Gem::LoadError)
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'
from /Users/me/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /Users/dereklo/.rvm/rubies/ruby-1.9.3-p448/bin/pod:22:in `<main>'
然而,当我运行sudo pod setup和sudo pod install时,它似乎有效:
sudo pod setup
Setting up CocoaPods master repo
Updating 4974084..a1c1bb3
Fast-forward
Heyzap/6.4.0/Heyzap.podspec | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100755 Heyzap/6.4.0/Heyzap.podspec
From https://github.com/CocoaPods/Specs
4974084..a1c1bb3 master -> origin/master
Setup completed (read-only access)
和
sudo pod install
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.2.0)
Generating Pods project
Integrating client project
[!] From now on use `adsfasdf.xcworkspace`.
为什么会这样?
答案 0 :(得分:1)
尝试删除POD Master时更好的方法...
一个。 pod repo remove master
然后重复播放设置...
B中。 pod setup
℃。为您的项目安装pod。