今天在更新cocoapods的时候,出现错误。错误如下:
ERROR:Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://ruby.taobao.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://ruby.taobao.org/specs.4.8.gz)
解决办法:
删除淘宝源:
gem sources --remove https://ruby.taobao.org/
添加由腾讯云提供服务的最新源:
gem sources -a https://gems.ruby-china.org/
--更新-- 2019年10月23日
域名变化,请大家使用 https://gems.ruby-china.com
$ gem sources -a https://gems.ruby-china.com/
$ gem sources -l
https://gems.ruby-china.com
# 确保只有 gems.ruby-china.com