Pit when using cocoapods

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}span.s1 {font-variant-ligatures: no-common-ligatures}span.Apple-tab-span {white-space:pre}

/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:308:in to_specs': Could not find 'cocoapods' (>= 0) among 11 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/Users/tiamo/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', executegem envfor more information from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:320:into_spec'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:65:in gem' from /usr/local/bin/pod:22:in<main>'

Enter sudo gem install -n /usr/local/bin cocoapods in the terminal, you can solve it, just use this sentence, I entered the so-called folder, and after careful analysis, it should be that the file was not successfully written, It's just written in the cache, so it's not good to turn it off, but if you use this sentence, you can directly point to the written file. Just prevent the problem just now.


Podfile file writing

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '7.0'
inhibit_all_warnings!

xcodeproj 'test'

pod 'AFNetworking', '~> 3.0.0'
pod 'SDWebImage', '~> 3.7.6'

target :test do
end

post_install do |installer|
installer.pods_project.targets.each do |target|
puts #{target.name}
end
end
iOS development

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326306516&siteId=291194637