Ruby Gem Timeout【超时】问题的解决

使用gem install的时候会显示类似下面的错误:

ERROR:  Could not find a valid gem 'fusuma' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - timed out (https://rubygems.org/specs.4.8.gz)

可以看到有了time out

网上目前的解决方案是把源换成淘宝的镜像,如下:

gem sources --remove https://rubygems.org/
gem source -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)

我英文不咋地,感觉像是淘宝证书过期了。

现在可以如下解决:

gem sources --remove https://rubygems.org/
gem sources -a https://gems.ruby-china.com/

应该就没问题了。

你可能感兴趣的:(Ruby Gem Timeout【超时】问题的解决)