我有一个通过 Hyper-V 运行的 Windows Server 2010 VM。我可以使用虚拟机中的 Web 浏览器连接到单个 gem,但是当我为任何 gem 运行 gem install 时,连接超时并出现我在下面粘贴的错误。图像使用虚拟交换机 - 您认为这是导致问题的原因吗?我不知道如何解决这个问题。
C:\Ruby193\bin>gem install rails -V
Error fetching remote data: Errno::ETIMEDOUT: A connection attempt f
ailed because the connected party did not properly respond after a period of tim
e, or established connection failed because connected host has failed to respond
. - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
Falling back to local-only install
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: A connection attempt failed because the connected party di
d not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2) (http://rubygems.org/
latest_specs.4.8.gz)