记录ruby安装后无法添加淘宝gem源

2019-04-26  本文已影响0人  不负好时光_9c46

 在cmd中输入: gem sources -a https://ruby.taobao.org/

提示以下错误:

ERROR:  SSL verification error at depth 0: certificate has expired (10)

ERROR:  Certificate /C=CN/ST=ZheJiang/L=HangZhou/O=Alibaba (China) Technology Co., Ltd./CN=*.taobao.org expired at 2018-12-05T03:16:02Z

Error fetching https://ruby.taobao.org/:

        SSL_connect returned=1 errno=0 state=error: certificate verify failed (certificate has expired) (https://ruby.taobao.org/specs.4.8.gz)

解决方案:

    网上的说法是淘宝的镜像源已经停止维护了,改用Ruby China

操作:

//1.删除原gem源:gem sources --removehttps://rubygems.org/

//2.添加Ruby China 源 :gem sources -a https://gems.ruby-china.com

//3.打印是否替换成功gem sources -l

//4.更换成功后打印如下*** CURRENT SOURCES ***https://gems.ruby-china.com

上一篇下一篇

猜你喜欢

热点阅读