获取错误:当我尝试使用Ruby ruby​​ 2.0.0p451安装gem时执行gem ...(Gem :: RemoteFetcher :: FetchError)

时间:2014-10-07 11:10:39

标签: ruby gem rubygems rvm bundle

我使用rvm安装了Ruby 2.0.0p451(2014-02-24修订版45167)[x86_64-darwin12.5.0],现在我有了这个列表:

⇒  rvm list

rvm rubies

   jruby-1.6.8 [ x86_64 ]
   jruby-1.7.0 [ x86_64 ]
   jruby-1.7.1 [ x86_64 ]
   mruby-head [ x86_64 ]
   rbx-head [ x86_64 ]
   ruby-1.8.7-head [ i686 ]
   ruby-1.8.7-p374 [ i686 ]
   ruby-1.9.3-p194 [ x86_64 ]
   ruby-1.9.3-p286 [ x86_64 ]
 * ruby-2.0.0-p353 [ x86_64 ]
=> ruby-2.0.0-p451 [ x86_64 ]
   ruby-2.0.0-preview2 [ x86_64 ]
   ruby-head [ x86_64 ]

# => - current
# =* - current && default
#  * - default

⇒  ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin12.5.0]

现在我无法安装任何宝石,当我这样做时,我收到一个错误:

⇒  gem install will_paginate
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: Operation timed out - connect(2) (https://your-dns-needs-immediate-attention.hi.link/quick/Marshal.4.8/will_paginate-3.0.7.gemspec.rz)

每当我尝试安装任何宝石时,我都会遇到几乎相同的错误。

任何帮助都将受到高度赞赏。

干杯

1 个答案:

答案 0 :(得分:2)

好吧,请耐心等待:转到OSX网络设置,在DNS下,您会在“搜索域”区域下看到home.network行。经过一些谷歌搜索,似乎comcast最近从hds1.ma.comcast.net;改变了这一点。更改它,重新启动并尝试gem install rails

最初发布了here