Unable to download data from https://gems.ruby-china.org/ - bad response Not Found 404

ZY_FlyWay發表於2019-04-23

問題:
升級Cocospod的時候,報錯。

 

環境
os: Mojave10.14.4
cocospod:1.6.0beta

 

報錯:

ERROR:  Could not find a valid gem 'cocoapods' (= 1.6.1), here is why:
          Unable to download data from https://gems.ruby-china.org/ - bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)

 

原因:

https://gems.ruby-china.org 映象404了,不提供服務。

 

嘗試:

嘗試(更換淘寶映象),發現淘寶映象2018.12停止服務。
下面試錯誤過程:

NvrdeiMac:ValidateSwift nvr$ gem sources --remove https://gems.ruby-china.org/
https://gems.ruby-china.org/ removed from sources
NvrdeiMac:ValidateSwift nvr$ gem source -l
*** CURRENT SOURCES ***

NvrdeiMac:ValidateSwift nvr$ 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=SSLv3 read server certificate B: certificate verify failed (https://ruby.taobao.org/specs.4.8.gz)

解決:

gem sources -a https://rubygems.org/

新增源來的ruby映象,感覺速度不慢了。畢竟ruby-china也關了。

相關文章