“在任何存储库中都找不到有效的 gem"(rubygame 等) [英] "Could not find a valid gem in any repository" (rubygame and others)

查看:11
本文介绍了“在任何存储库中都找不到有效的 gem"(rubygame 等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试安装这个rubygame"gem,但每当我使用命令时

I've been trying to install this 'rubygame' gem for some time, but whenever I use the command

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)

我也尝试过其他 gem,但结果相似:

I've also tried other gems but with similar results:

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​​ 和 ruby​​gems(目前使用 ruby​​ 1.8、rubygems 1.7.2).谷歌搜索根本没有帮助我.如果有人能解决我的问题,我将不胜感激.我的来源列表仅显示 http://rubygems.org

I've already made sure I have an internet connection, and have already tried reinstalling both ruby and rubygems (currently using ruby 1.8, rubygems 1.7.2). Googling didn't help me at all. I would be very grateful if anyone can solve my problem. My sources list only shows http://rubygems.org

推荐答案

检查你是否有"https://rubygems.org/"作为寻找宝石的来源:

Check if you have "https://rubygems.org/" as a source to find gems at:

$ gem sources
*** CURRENT SOURCES ***

https://rubygems.org/

如果没有,你应该可以添加它

If not, you should be able to add it with

$ gem sources --add https://rubygems.org/
https://rubygems.org/ added to sources

这里gem source 命令的文档.

这篇关于“在任何存储库中都找不到有效的 gem"(rubygame 等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆