我在主要开发机器上安装了Xcode 5 DP 4。它可能是无关的,但从那以后,我一直无法安装任何Ruby宝石。如果我输入:
$ gem install rails
它只是挂起。任何其他宝石都一样。如果我执行ping
或traceroute
,我会得到以下结果:
$ ping rubygems.org
PING rubygems.org (54.245.255.174): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
--- rubygems.org ping statistics ---
6 packets transmitted, 0 packets received, 100.0% packet loss
$ traceroute rubygems.org
traceroute to rubygems.org (54.245.255.174), 64 hops max, 52 byte packets
1 cpe-76-176-148-1.san.res.rr.com (76.176.148.1) 25.744 ms 26.720 ms 29.172 ms
2 tge1-2.crlscaij-cer01.socal.rr.com (76.166.18.105) 11.141 ms 25.128 ms 13.334 ms
3 tge0-8-0-2.sndhcaax-ccr01.socal.rr.com (72.129.1.98) 19.853 ms 16.387 ms 16.660 ms
4 agg22.lsancarc-ccr01.socal.rr.com (72.129.1.0) 16.843 ms 19.371 ms 20.137 ms
5 107.14.17.132 (107.14.17.132) 16.329 ms 15.789 ms 15.733 ms
6 66.109.9.24 (66.109.9.24) 17.291 ms 17.508 ms 18.562 ms
7 las-bb1-link.telia.net (213.248.97.9) 16.518 ms
las-bb1-link.telia.net (213.248.86.189) 17.344 ms 17.765 ms
8 sjo-bb1-link.telia.net (213.155.134.103) 34.644 ms
sjo-bb1-link.telia.net (213.155.137.63) 27.458 ms
sjo-bb1-link.telia.net (213.248.80.16) 31.402 ms
9 sea-b1-link.telia.net (213.155.134.81) 64.071 ms
sea-b1-link.telia.net (213.155.136.69) 52.928 ms 54.107 ms
10 amazon-ic-151248-sea-b1.c.telia.net (213.248.94.30) 52.468 ms 49.540 ms 47.592 ms
11 205.251.225.184 (205.251.225.184) 51.268 ms
205.251.225.178 (205.251.225.178) 48.527 ms
205.251.225.184 (205.251.225.184) 93.230 ms
12 205.251.232.74 (205.251.232.74) 68.416 ms
205.251.232.88 (205.251.232.88) 59.782 ms
205.251.232.94 (205.251.232.94) 58.221 ms
13 205.251.232.153 (205.251.232.153) 56.725 ms
205.251.232.147 (205.251.232.147) 59.429 ms
205.251.232.153 (205.251.232.153) 62.639 ms
14 205.251.232.165 (205.251.232.165) 59.367 ms 56.984 ms 77.981 ms
15 ec2-50-112-0-159.us-west-2.compute.amazonaws.com (50.112.0.159) 56.961 ms
ec2-50-112-0-241.us-west-2.compute.amazonaws.com (50.112.0.241) 58.880 ms
ec2-50-112-0-249.us-west-2.compute.amazonaws.com (50.112.0.249) 59.972 ms
16 *
我会在第16跳之后为你节省垃圾。
问题:这可能是什么问题? DNS正在解析rubygems.org,因为我可以直接进入网页。有关再次安装宝石的提示吗?
哦,顺便说一句,我做了一个xcode-select -switch
来恢复我的Xcode 4框架和工具。
谢谢!
答案 0 :(得分:0)
好的,我在回复了弗雷德里克·张的评论后追踪了它。在.gemrc文件中,有一个对gems.rubyforge.org的引用,它已超时。在此期间,没有其他宝石资源被检查。
删除此来源可解决问题。