cocoapod安装过程中的幺蛾子

cocoapod是GoogleMobileAd framework推荐的一个自动解决依赖关系的工具。
 
安装cocoapod时遇到问题:
EthandeMacBook-Air:Xcode ethan$ sudo gem install cocoapods
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)
 
在google上搜了一堆歪果仁的答案,都没什么卵用。 
解决方案: 这是由中国特色GFW导致的故障,将gem源换掉即可:
 
EthandeMacBook-Air:Xcode ethan$ gem sources --remove https://rubygems.org/
https://rubygems.org/ removed from sources
EthandeMacBook-Air:Xcode ethan$ gem sources -a https://ruby.taobao.org/
https://ruby.taobao.org/ added to sources
 
理论上讲
 
找不到命令pod,运行which pod没有反应,由于权限引起,
sudo chmod 755 /usr/local/bin
 
上一篇:Java获取某年某周的最后一天


下一篇:android 加载assets目录下的静态html文件案例