解决步骤如下:
1.gem source -l
如果显示:
- CURRENT SOURCES *
https://ruby.taobao.org/
移除
2.sudo gem install cocoapods
ERROR: While executing gem … (OpenSSL::SSL::SSLError)
hostname “upyun.gems.ruby-china.org” does not match the server certificate
3.gem sources –remove https://ruby.taobao.org/
4.gem sources -a https://gems.ruby-china.org
5.sudo gem update –system
6.sudo gem install -n /usr/local/bin cocoapods –pre
网友评论