报错如下:
$ gem install actionview -v 4.1.7
Fetching: actionview-4.1.7.gem ( 10%)
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
too many connection resets (https://gems-ruby-china.b0.upaiyun.com/gems/actionview-4.1.7.gem)
刚刚下载 unf_ext 这个 gem 也出现了错误
gem install unf_ext -v '0.0.7.2' --verbose
Getting SRV record failed: DNS result has no information for _rubygems._tcp.gems.ruby-china.org
HEAD https://gems.ruby-china.org/api/v1/dependencies
200 OK
GET https://gems.ruby-china.org/api/v1/dependencies?gems=unf_ext
200 OK
Getting SRV record failed: DNS result has no information for _rubygems._tcp.gems.ruby-china.org
Downloading gem unf_ext-0.0.7.2.gem
GET https://gems.ruby-china.org/gems/unf_ext-0.0.7.2.gem
302 Moved Temporarily
GET https://gems-ruby-china.b0.upaiyun.com/gems/unf_ext-0.0.7.2.gem
Fetching: unf_ext-0.0.7.2.gem (100%)
200 OK
ERROR: Error installing unf_ext:
invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/cache/unf_ext-0.0.7.2.gem
然后这样一来我开始质疑 UpYun 上面配置缓存以及镜像存储功能了,照理说上面几个文件都是热门的,老早就应该长久存在国内 UpYun 的服务器上面了,缓存有效期是一年,并且有开镜像存储(文件永久存到 UpYun 里面),以后的请求都是国内的。
问题可能是多方面的,之前 UpYun 上面配置的回源地址是到一个 QCloud 的负载均衡上面,然后再到国外 QCloud 的主机(这个时候,QCloud 地址直接访问是没有问题的,看起来服务都是正常的),而恰好 UpYun 回源过去这样无法连通,怀疑可能是两个点之间存在某些问题导致(具体不清楚,没地方查)
Fetching source index from https://gems.ruby-china.org/
Network error while fetching
https://gems-ruby-china.b0.upaiyun.com/quick/Marshal.4.8/actionmailer-4.2.5.2.gemspec.rz
$ gem install rails
Fetching: minitest-5.8.4.gem (100%)
Successfully installed minitest-5.8.4
...
Fetching: nokogiri-1.6.7.2.gem (100%)
Building native extensions. This could take a while...
Successfully installed nokogiri-1.6.7.2
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Bad Gateway 502 (https://gems-ruby-china.b0.upaiyun.com/quick/Marshal.4.8/rails-deprecated_sanitizer-1.0.3.gemspec.rz)
和@ibachue 的问题类似。