我尝试安装这个“rubygame”gem有一段时间了,但是每当我使用该命令时
gem install rubygame
它会给出一个错误:
ERROR: Could not find a valid gem 'rubygame' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
我也尝试过其他宝石,但结果相似:
ERROR: Could not find a valid gem 'rake' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
我已经确保我有互联网连接,并且已经尝试重新安装 ruby 和 rubygems(当前使用 ruby 1.8、rubygems 1.7.2)。谷歌搜索根本没有帮助我。如果有人能解决我的问题,我将非常感激。我的来源列表仅显示http://rubygems.org http://rubygems.org
检查您是否有“https://rubygems.org/ https://rubygems.org/“ 作为寻找宝石的来源:
$ gem sources
*** CURRENT SOURCES ***
https://rubygems.org/
如果没有,您应该可以添加它
$ gem sources --add https://rubygems.org/
https://rubygems.org/ added to sources
Here http://guides.rubygems.org/command-reference/#gem_sources是文档gem source
命令。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)