cocoapods在安装过程中的一些错误
错误如下:
/Users/myusername/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'cocoa pods' (>= 0) among 37 total gem(s) (Gem::LoadError) from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec' from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem' from /Users/quique123/.rvm/rubies/ruby-1.9.3-p194/bin/pod:22:in `<main>'
/Users/myusername/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'cocoa pods' (>= 0) among 37 total gem(s) (Gem::LoadErrorfrom
/Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'from
/Users/quique123/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:53:in `gem from
/Users/quique123/.rvm/rubies/ruby-1.9.3-p194/bin/pod:22:in `<main>'
解决方法如下:
0. 卸载CocoaPods
sudo gem uninstall cocoapods
1.更新Ruby
which ruby
2.安装无sudo的
cocoapods
gem install cocoapods -V --no-ri --no-rdoc
# V: Verbose; no-ri,no-rdoc: Do not install documentation
3.Set up Cocoapods
pod setup