Original address: Http://www.cnblogs.com/zxs-19920314/p/4985476.html?utm_source=tuicool&utm_medium=referral
1. Remove the existing Ruby default source
$gem sources--remove HTTPS://RUBYGEMS.ORG/2. Use the new source $gem sources-a HTTPS://RUBY.TAOBAO.ORG/3. Verify that Xinyuan is replaced successfully $gem Sources-l 4. Install Cocoapods (1) $sudo gem install cocoapods Note: The Apple system upgrades OS X EL Capitan to $sudo Gem Install-n/usr/local/bin cocoapods (2) $po D Setup 5. Update Gem$sudo gem Update--system 6. Create a new project and use CD instructions in the terminal to $pod search third party 7. Create a new file Vim "Podfile", $vim Podfile write the following content and Save tip: (terminal vim file Press I editable, ESC exit Edit: Wq can be saved exit) Platform:ios, ' 6.0 ' pod ' afnetworking ', ' ~> 2.3.1 ' <-------Third Party 8. Guide into a third-party library $pod install 9. Exit Terminal The following are some errors that occurred when I installed the previous installation process terminal Cocoapods download bug debug: Error 1:error fetching http://ruby.taobao.org/:
Bad response not Found 404 (http://ruby.taobao.org/specs.4.8.gz) Solution: Change the installation process $gem SOURCES-A http://ruby.taobao.org/--- For----> $gem sources-a https://ruby.taobao.org/error 2:error:while executing gem ... (errno::eperm) Operation not permitted-/usr/bin/pod solution: The plug-in error will occur after the Apple system upgrades OS X EL Capitan, the installation process 4. Install Cocoapods (1) sudo gem install cocoa pods--> change to sudo gem install-n/usr/local/bin cocoapods error 3:[!] Unable to satisfy the following requirements:
-' Avoscloud (~> 3.1.6.3) ' required by ' podfile '
Specs satisfying the ' Avoscloud (~> 3.1.6.3) ' dependency were found, but they required a higher minimum deployment Targ Et.
Solution: Installation process: Podfile file in Platform:ios, ' 6.0 ' behind the 6.0 is the platform version number, be sure to add
Reproduced installation process for CocoaPods