更新gem发现老是报错,刚开始没想到是gem源的问题,网上各种百度,最后发现是因为存在两个gem源导致的失败,错误提示如下:
192:~ zsy$ sudo gem update --system
Password:
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://ruby.taobao.org/specs.4.8.gz)
192:~ zsy$ gem sources
*** CURRENT SOURCES ***
https://ruby.taobao.org/
https://gems.ruby-china.com
192:~ zsy$ gem sources -r https://ruby.taobao.org/
https://ruby.taobao.org/ removed from sources
通过指令
gem sources 查看
然后 删除淘宝的
gem sources -r https://ruby.taobao.org/
然后更新
sudo gem update --system
成功~~~
网友评论