安装CocoaPods

1.新电脑首先输入

sudo gem install cocoapods

2.出现

ERROR:  Could not find a valid gem 'cocoapods' (>= 0), here is why:

Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/latest_specs.4.8.gz)


3.输入

 gem sources –remove https://rubygems.org/

出现

*** CURRENT SOURCES ***

https://rubygems.org/


4.输入

gem sources -a https://ruby.taobao.org/

出现

https://ruby.taobao.org/ added to sources

5.输入

gem sources -l

*** CURRENT SOURCES ***

https://rubygems.org/

https://ruby.taobao.org/

yanwenbodeMacBook-Pro:~ luobo$


6.输入

sudo gem install cocoapods


然后输入

pod setup

你可能感兴趣的:(安装CocoaPods)