几年前,由我起头,我们搭建了 ruby.taobao.org 为国内开发者解决 Gem 安装的问题,现在应该国内绝大多数,甚至所有(国内服务器,国内网络)的 Ruby 开发者企业,应该都在用它。
但最近越来越发现之前 ruby.taobao.org 很难同步了,原因有很多,之前的实现方式过于复杂,服务器在国内,同步困难,阿里的网络安全要求维护服务器得是公司员工.... 各种限制导致我们在维护的时候困难重重,尤其是当 @fsword @qhwa 离职以后,根本无法再继续维护了。
为了有一个可持续发展未来,我们考虑由 Ruby China 来负责这个事情,这样可以像现在 Ruby China 社区,RubyConf China 一样,由社区的很多参与者来共同维护。
这件事情我们已经考虑了一年了,之前一直没有找到一个好的方式来解决,以及一些其他因素,比如资金的问题。
这周,我们终于找到了解决方案,也找到了赞助商:
腾讯云慷慨的给我们赞助了第一期 30000 元用于服务器以及 CDN 的开销。
2016-05-18 Updated: Gems 存储放到了 UpYun 上面,通过 UpYun 的 CDN 来解决,同时配合 UpYun 的镜像存储功能,减少回源到国外的次数。 过程:https://ruby-china.org/topics/29978
[gems.ruby-china.org] [cdn.gems.ruby-china.org]
|
{Load Balance us.gems.ruby-china.org}
|
[us0.gems.ruby-china.org] ... us1 .. us2
|
[Nginx]
|
---------------------------------------------------------------------------------------
| | | |
{*.4.8, *.4.8.gz} {/gems, /quick} {/} {/api}
| | | |
[rubygems.global.ssl.fastly.net] <gems-ruby-china.b0.upaiyun.com> [app server] [rubygems.org]
|
[UpYun CDN]
|
----------------------
Found Not Found
| |
[200] [rubygems.global.ssl.fastly.net]
|
[200] ------------> [UpYun Mirror Store]
在那边的页面有介绍了,和之前 ruby.taobao.org 的方式也是一样的。
https://github.com/ruby-china/rubygems-mirror
我们稍后会跟进,目前腾讯云 CDN 上面上传 SSL 证书信息在我这里有点问题。
SSL 已上线!
#2 楼 @jasl 礼尚往来呀,看这里:https://cnodejs.org/topic/51f5cb4ef4963ade0e715f87#51f5ebed44e76d216a069f12
hostname "gems.ruby-china.org" does not match the server certificate (https://gems.ruby-china.org/specs.4.8.gz)
出现问题
me too
➜ test git:(master) ✗ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
Error fetching https://gems.ruby-china.org/:
hostname "gems.ruby-china.org" does not match the server certificate (https://gems.ruby-china.org/specs.4.8.gz)
这个必须支持一下 一直用 ruby.taobao.org 偶尔会有不稳定的情况 尤其用国外的 ci 服务 比较慢 如果有国外的 cdn 就好多了 支持一下!!!
唉 当时是看着 ruby-china 成长起来的 然后学的 mongodb 现在 ruby-china 不用 mongodb 了。。我的项目好多地方想参考下都没的参考了 这个还是有点遗憾
偶尔 会有 HTTPError
Fetching gem metadata from http://gems.ruby-china.org/..Retrying dependency api due to error (2/4): Bundler::HTTPError Network error while fetching http://gems.ruby-china.org/api/v1/dependencies?gems=actionpack%2Crailties%2Csass%2Csprockets%2Ctilt%2Csprockets-rails%2Cthor%2Crails-dom-testing%2Cautoprefixer-rails%2Cjson%2Crdoc%2Csanitize%2Cactivesupport%2Crake%2Cactiverecord%2Crack%2Cactivemodel%2Cbinding_of_caller%2Cdebug_inspector%2Cminitest%2Ci18n%2Cculerity%2Cnokogiri%2Crack-test%2Cmime-types%2Ccelerity%2Cxpath%2Caddressable%2Cconfiguration%2Cspoon%2Cffi%2Crails_serve_static_assets%2Crails_stdout_logging%2Cactionmailer%2Cactiveresource%2Cactionwebservice%2Cbundler%2Cactionview%2Cactivejob%2Cactioncable%2Ctherubyracer%2Cexecjs%2Cmulti_json%2Ccoffee-script%2Cturbolinks-source%2Cblankslate%2Chaml%2Chtml2haml%2Choe%2Csubexec
Retrying dependency api due to error (3/4): Bundler::HTTPError Network error while fetching http://gems.ruby-china.org/api/v1/dependencies?gems=actionpack%2Crailties%2Csass%2Csprockets%2Ctilt%2Csprockets-rails%2Cthor%2Crails-dom-testing%2Cautoprefixer-rails%2Cjson%2Crdoc%2Csanitize%2Cactivesupport%2Crake%2Cactiverecord%2Crack%2Cactivemodel%2Cbinding_of_caller%2Cdebug_inspector%2Cminitest%2Ci18n%2Cculerity%2Cnokogiri%2Crack-test%2Cmime-types%2Ccelerity%2Cxpath%2Caddressable%2Cconfiguration%2Cspoon%2Cffi%2Crails_serve_static_assets%2Crails_stdout_logging%2Cactionmailer%2Cactiveresource%2Cactionwebservice%2Cbundler%2Cactionview%2Cactivejob%2Cactioncable%2Ctherubyracer%2Cexecjs%2Cmulti_json%2Ccoffee-script%2Cturbolinks-source%2Cblankslate%2Chaml%2Chtml2haml%2Choe%2Csubexec
添加源遇到问题 Error fetching https://gems.ruby-china.org/: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://gems.ru by-china.org/specs.4.8.gz)
现在 gem 包都安装不上,提示如下:大家有这种情况吗? $ bundle install Fetching gem metadata from https://ruby.taobao.org/........... Fetching version metadata from https://ruby.taobao.org/.. Resolving dependencies............. Using rake 10.5.0 Using i18n 0.7.0 Using json 1.8.3
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/minitest-5.8.4.gem) Using thread_safe 0.3.5
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/builder-3.2.2.gem)
$ bundle install Fetching gem metadata from https://rubygems.org/........... Fetching version metadata from https://rubygems.org/... Fetching dependency metadata from https://rubygems.org/.. Resolving dependencies............
Gem::RemoteFetcher::FetchError: Errno::ETIMEDOUT: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) for "rubygems.org" port 443 (https://rubygems.org/gems/rake-11.1.0.gem)
:(昨天我也遇到 Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/gems/minitest-5.8.4.gem) Using thread_safe 0.3.5
这个错误,估计是淘宝镜像的问题。这个好消息来的真是及时啊。哎,天朝程序猿也真 TM 命苦
貌似也有点问题啊。 Error fetching https://gems.ruby-china.org/: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: ce rtificate verify failed (https://gems.ruby-china.org/specs.4.8.gz) 是不是还在调试中?
#73 楼 @jhyc windows 的话看这个 issue, https://github.com/ruby-china/rubygems-mirror/issues/5
#6 楼 @huacnlee 大神,厚着脸皮来求你帮帮忙,实在没办法了。https://ruby-china.org/topics/29323#reply10
time curl -I https://gems.ruby-china.org/specs.4.8.gz
HTTP/1.1 200 OK
Server: nnws/1.7.3.6
Date: Mon, 14 Mar 2016 06:11:12 GMT
Content-Type: application/octet-stream
Content-Length: 2754937
Connection: keep-alive
Last-Modified: Mon, 14 Mar 2016 06:08:39 GMT
x-amz-id-2: zSQTtBiea/D+bYUaEysB5dDLwQUnTORjMXrxEXCN0xAK1a7NMcVblH4GxyrK8PV5aOHvnzNxJIM=
x-amz-request-id: BEDBC03AC1B4C130
x-amz-replication-status: PENDING
x-amz-version-id: tYMQMF7kPdAW0JEIUDEisJxc9z7XHPqU
x-amz-meta-surrogate-key: full-index
ETag: "fba8e2bffb56ce7579af4dbf7d526bea"
Via: 1.1 varnish
Fastly-Debug-Digest: 0debb0ceabb31d16abb864478a5071786f8f67d8d7863ea1fe1be712493ee2ac
Accept-Ranges: bytes
Via: 1.1 varnish
Age: 94
X-Served-By: cache-sea1922-SEA, cache-ord1731-ORD
X-Cache: HIT, HIT
X-Cache-Hits: 5, 1
X-Daa-Tunnel: hop_count=1
X-Cache-Lookup: Hit From Upstream
curl -I https://gems.ruby-china.org/specs.4.8.gz 0.04s user 0.02s system 0% cpu 54.597 total
腾讯云的云硬盘略坑啊,居然没有默认挂载上,需要手动执行:
$ sudo su root
$ if grep -q /data /etc/fstab ; then uuid=notneed; echo /data already in fstab; else uuid=`mkfs.ext3 /dev/vdb > /dev/null 2>&1 && blkid /dev/vdb | awk '{print $2}'`;fi;if [[ $uuid == UUID* ]]; then echo $uuid /data ext3 noatime,acl,user_xattr 1 0 >> /etc/fstab; mount -a; else echo mkfs failed; fi;
~/.middleman:$ gem install middleman -V
HEAD https://ruby.taobao.org/api/v1/dependencies
200 OK
GET https://ruby.taobao.org/api/v1/dependencies?gems=middleman
200 OK
GET https://ruby.taobao.org/quick/Marshal.4.8/middleman-4.1.2.gemspec.rz
302 Moved Temporarily
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/quick/Marshal.4.8/middleman-4.1.2.gemspec.rz)
已经使用几天,相当不稳定,经常遇到错误,几乎没有一次 bundle install
能一次成功。
Fetching gem metadata from https://gems.ruby-china.org/..Retrying dependency api due to error (2/4): Bundler::HTTPError Network error while fetching https://gems.ruby-china.org/api/v1/dependencies?gems=spoon%2Ccucumber%2Ccolorize%2Ccolored%2Ciobuffer%2Clockfile%2Cbones%2Caddresasble%2Ctinder%2Cstrptime%2Cprogressbar%2Crspec-instafail%2Cchalofa_ruby-progressbar%2Crb-fchange%2Crb-kqueue%2Ccelluloid%2Ccelluloid-io%2Cspicycode-rcov%2Csyntax%2Cgrowl%2Clibnotify%2Csys-uname%2Copen_gem%2Cwin32console%2Chttp-cookie%2Cflexmock%2Clivescript-source%2Csfl%2Cfaye-websocket%2Cbackports%2Castrolabe%2Chpricot%2Chtmlentities%2Cechoe%2Cjeweler%2Cruby-debug19%2Cbourne%2Cwebrat%2Crspec-collection_matchers%2Credis-namespace%2Ccompass%2Csprockets-sass%2Clibwebsocket%2Cshotgun%2Ctherubyracer%2Caaronh-chronic%2Crest_client
Retrying dependency api due to error (3/4): Bundler::HTTPError Net::HTTPBadGateway: <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nnws/1.7.3.6</center>
</body>
</html>
Retrying dependency api due to error (4/4): Bundler::HTTPError Net::HTTPBadGateway: <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nnws/1.7.3.6</center>
</body>
</html>
Gem::RemoteFetcher::FetchError: bad response Bad Gateway 502 (https://gems.ruby-china.org/gems/actionpack-xml_parser-1.0.2.gem)
Bundler::GemspecError: Could not read gem at /home/vanitas/.gem/ruby/2.3/cache/haml-4.0.7.gem. It may be corrupted.
#85 楼 @geekontheway 为什么后面请求的是淘宝的 API 呢?
回源的时候的延迟,gem 一多特别容易让 bundle 中断,部署的时候带上 --retry
加上应该会好一些。
阿里云部署 Discourse 的时候大概因此中断了 3 - 4 次,但是问题很奇怪,有的时候是 gem 下载问题(看起来像回源失败),但是之后再执行 gem update bundler
也因为下不到 spec4.8 失败了(这肯定就不是回源的问题了)。倒是 DigitalOcean 都只中断了 1 次,谜一般...😓
因为不断失败,所以开始走查问题。以下尝试来自于阿里云上海的 139.196.41.197(ipip.net)机器按照 https://gems.ruby-china.org 这个 URL 部署 Discourse 碰到的错误(生产环境部署)。
例子:
第 2 次重试失败(FetcherError 和 GemspecError,应该是 CDN 回源的问题):
Bundler::GemspecError: Could not read gem at /var/www/discourse/vendor/bundle/ruby/2.0.0/cache/redis-3.2.1.gem. It may be corrupted.
Bundler::GemspecError: Could not read gem at /var/www/discourse/vendor/bundle/ruby/2.0.0/cache/msgpack-0.5.11.gem. It may be corrupted.
Gem::RemoteFetcher::FetchError: bad response Bad Gateway 502 (https://gems.ruby-china.org/gems/rb-fsevent-0.9.4.gem)
第 3 次重试失败(API 失败,SSL 签名错误;但是之前的 24 次请求没有问题):
could not fetch from the dependency API, trying the full index
HTTP GET https://gems.ruby-china.org/quick/Marshal.4.8/actionmailer-4.1.10.gemspec.rz
Could not verify the SSL certificate for
https://gems.ruby-china.org/quick/Marshal.4.8/actionmailer-4.1.10.gemspec.rz.
第 4、5 次重试失败:
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
server did not return a valid file (https://gems.ruby-china.org/specs.4.8.gz
bad response Bad Gateway 502 (https://gems.ruby-china.org/specs.4.8.gz)
既然不是回源问题,那么重新回到 CA 证书这个点上。按照 issues 给的链接从 https://curl.haxx.se/ca/cacert.pem 导入证书链,再指定环境变量。(缺点显而易见,公钥的 integrity 没有保障。不过这是目前的一个让源能用起来的 hack)
然而重新回到了 4、5 次重试的时候失败的问题。虽然仍然不排除阿里云的链接问题。但结合其他人碰到的问题回到镜像的部署问题,还是应该探索下解决的办法,故已提交 issue。
http 的环境下 bundle 是成功的,不过 Discourse 相关 gem 花了 18 分钟。
经常会有这样的错误 改成 http://协议的地址不回出现。
Fetching additional metadata from https://gems.ruby-china.org/.Retrying dependency api due to error (2/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://gems.ruby-china.org/api/v1/dependencies?gems=celluloid-gems,faraday-middleware.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying dependency api due to error (3/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://gems.ruby-china.org/api/v1/dependencies?gems=celluloid-gems,faraday-middleware.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
gem sources -a https://gems.ruby-china.org/ Error fetching https://gems.ruby-china.org/: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: ce rtificate verify failed (https://gems.ruby-china.org/specs.4.8.gz)
为啥这个源也是不行呢
#93 楼 @huacnlee 貌似服务器是不是有问题,请求超时了
☁ ~ http head https://gems.ruby-china.org/specs.4.8.gz
http: error: Request timed out (30s).
I, [2016-03-16T12:38:09.627165 #37] INFO -- : > gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
I, [2016-03-16T12:39:38.621329 #37] INFO -- : Error fetching https://gems.ruby-china.org/:
server did not return a valid file (https://gems.ruby-china.org/specs.4.8.gz)
I, [2016-03-16T12:39:38.622425 #37] INFO -- : Terminating async processes
I, [2016-03-16T12:39:38.622530 #37] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main pid: 66
I, [2016-03-16T12:39:38.622655 #37] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 194
2016-03-16 12:39:38 UTC [66-2] LOG: received fast shutdown request
2016-03-16 12:39:38 UTC [66-3] LOG: aborting any active transactions
2016-03-16 12:39:38 UTC [73-2] LOG: autovacuum launcher shutting down
2016-03-16 12:39:38 UTC [70-1] LOG: shutting down
194:signal-handler (1458131978) Received SIGTERM scheduling shutdown...
194:M 16 Mar 12:39:38.652 # User requested shutdown...
194:M 16 Mar 12:39:38.653 * Saving the final RDB snapshot before exiting.
2016-03-16 12:39:38 UTC [70-2] LOG: database system is shut down
194:M 16 Mar 12:39:38.710 * DB saved on disk
194:M 16 Mar 12:39:38.710 # Redis is now ready to exit, bye bye...
FAILED
--------------------
RuntimeError: gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ failed with return #<Process::Status: pid 287 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cmd"=>["gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/"]}
4d3a9a5937702a71e03afd53cf92ca6870fe1ddfb48c225852659f158375a719
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
执行 sudo gem install rails ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/rackup
@huacnlee 好像有点慢? 机房在北京
$ ping gems.ruby-china.org
PING 12f7b4-0.ca.1251971244.clb.myqcloud.com (45.113.69.41) 56(84) bytes of data.
64 bytes from 45.113.69.41: icmp_seq=1 ttl=49 time=233 ms
64 bytes from 45.113.69.41: icmp_seq=2 ttl=49 time=230 ms
64 bytes from 45.113.69.41: icmp_seq=3 ttl=49 time=231 ms
64 bytes from 45.113.69.41: icmp_seq=4 ttl=49 time=231 ms
64 bytes from 45.113.69.41: icmp_seq=5 ttl=49 time=232 ms
64 bytes from 45.113.69.41: icmp_seq=6 ttl=49 time=227 ms
64 bytes from 45.113.69.41: icmp_seq=7 ttl=49 time=234 ms
64 bytes from 45.113.69.41: icmp_seq=8 ttl=49 time=233 ms
64 bytes from 45.113.69.41: icmp_seq=9 ttl=49 time=229 ms
64 bytes from 45.113.69.41: icmp_seq=10 ttl=49 time=230 ms
^C
--- 12f7b4-0.ca.1251971244.clb.myqcloud.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9003ms
rtt min/avg/max/mdev = 227.386/231.563/234.802/2.112 ms
对比之前的 taobao 源
$ ping ruby.taobao.org
PING ruby.taobao.org (223.6.253.37) 56(84) bytes of data.
64 bytes from 223.6.253.37: icmp_seq=1 ttl=41 time=34.8 ms
64 bytes from 223.6.253.37: icmp_seq=2 ttl=41 time=34.9 ms
64 bytes from 223.6.253.37: icmp_seq=3 ttl=41 time=34.9 ms
64 bytes from 223.6.253.37: icmp_seq=4 ttl=41 time=35.0 ms
64 bytes from 223.6.253.37: icmp_seq=5 ttl=41 time=35.0 ms
64 bytes from 223.6.253.37: icmp_seq=6 ttl=41 time=34.9 ms
64 bytes from 223.6.253.37: icmp_seq=7 ttl=41 time=34.9 ms
64 bytes from 223.6.253.37: icmp_seq=8 ttl=41 time=34.9 ms
64 bytes from 223.6.253.37: icmp_seq=9 ttl=41 time=35.0 ms
64 bytes from 223.6.253.37: icmp_seq=10 ttl=41 time=35.0 ms
^C
--- ruby.taobao.org ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9010ms
rtt min/avg/max/mdev = 34.866/34.977/35.086/0.229 ms
cgem 国内无忧切 gem source, http://cao7113.github.io/ruby/2016/03/23/cgem-how-to-switch-gem-source-in-china.html
在 腾讯云上 使用,bundle install 时好多 timeout
Gem::RemoteFetcher::UnknownHostError: timed out (https://gems.ruby-china.org/gems/net-ssh-3.1.1.gem) Gem::RemoteFetcher::UnknownHostError: timed out (https://gems.ruby-china.org/gems/cocoon-1.2.9.gem)
windows 下报 certificate verify failed 错误是 ssl 证书的问题,这里有解决办法。 https://gist.github.com/fnichol/867550 http://blog.163.com/sdhhqb@126/blog/static/637055372016230923537/
CDN 是不是有问题?经常连接超时。
Gem::RemoteFetcher::FetchError: Errno::ETIMEDOUT: Operation timed out - SSL_connect (https://gems.ruby-china.org/gems/fog-vmfusion-0.1.0.gem)
Installing fog-atmos 0.1.0
Installing fog-ecloud 0.3.0
Installing fog-profitbricks 0.0.3
Installing fog-terremark 0.1.0
Installing fog-voxel 0.1.0
Installing fog-aws 0.1.1
Installing fog-brightbox 0.8.0
Installing fog-radosgw 0.0.4
Installing fog-sakuracloud 1.0.1
Installing fog-serverlove 0.1.2
Installing fog-softlayer 0.4.7
Gem::RemoteFetcher::FetchError: Errno::ETIMEDOUT: Operation timed out - SSL_connect (https://gems.ruby-china.org/gems/fog-storm_on_demand-0.1.1.gem)
An error occurred while installing fog-vmfusion (0.1.0), and Bundler cannot continue.
Make sure that `gem install fog-vmfusion -v '0.1.0'` succeeds before bundling.
dig 了下,貌似解析回来的是个加拿大的 IP 地址:
~ dig @114.114.114.114 gems.ruby-china.org
; <<>> DiG 9.10.3-P4 <<>> @114.114.114.114 gems.ruby-china.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53557
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;gems.ruby-china.org. IN A
;; ANSWER SECTION:
gems.ruby-china.org. 553 IN CNAME 12f7b4-0.ca.1251971244.clb.myqcloud.com.
12f7b4-0.ca.1251971244.clb.myqcloud.com. 553 IN A 45.113.69.41
;; Query time: 51 msec
;; SERVER: 114.114.114.114#53(114.114.114.114)
;; WHEN: Wed Apr 06 11:05:44 CST 2016
;; MSG SIZE rcvd: 106
gem sources --add https://gems.ruby-china.org/ --remove https://
rubygems.org/
Error fetching https://gems.ruby-china.org/:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: ce
rtificate verify failed (https://gems.ruby-china.org/specs.4.8.gz)
感觉很卡,偶尔还会出现安装问题。例如 Error installing concurrent-ruby: invalid gem: package is corrupt, exception while verifying: undefined method `size' for nil:NilClass (NoMethodError) in /Users/ok/.rvm/gems/ruby-2.2.3@rails426/cache/concurrent-ruby-1.0.2.gem
#124 楼 @qq83387856 更新一下证书 rvm osx-ssl-certs update all (mac),其它的参考 https://rvm.io/support/fixing-broken-ssl-certificates