RubyGems - 我的系统似乎找不到任何要安装的远程 gem
尝试安装“less”gem。我按照 http://lesscss.org/ 中的说明输入 sudo gem install less
,我收到以下错误:
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find less (> 0) in any repository
好吧,所以我想也许我只需要更新 RubyGems。尝试“gem update --system”让我感到
Updating RubyGems...
Attempting remote update of rubygems-update
ERROR: While executing gem ... (Gem::InstallError)
rubygems-update requires builder >= 0
困惑。好吧,那么让我们尝试“sudo gem install builder”:
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find builder (> 0) in any repository
似乎无论我尝试安装什么 gem,都无法在任何存储库中找到它。我检查了我的环境,并列出了 rubyforge:
RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- GEM PATH:
- /usr/local/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
知道发生了什么吗?我使用的是 OSX 10.4,在此之前我安装了 Ruby 1.8.6。
Trying to install the 'less' gem. I type sudo gem install less
as instructed at http://lesscss.org/, and I get the following error:
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find less (> 0) in any repository
Alright, so I figure maybe I just need to update RubyGems. Trying 'gem update --system' gets me
Updating RubyGems...
Attempting remote update of rubygems-update
ERROR: While executing gem ... (Gem::InstallError)
rubygems-update requires builder >= 0
Arrgh. Alright, then let's try 'sudo gem install builder':
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find builder (> 0) in any repository
Seems that no matter what gem I try to install, it can't be found in any repository. I check my environment, and rubyforge is listed:
RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- GEM PATH:
- /usr/local/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
Any idea what's going on? I'm on OSX 10.4, and I installed Ruby 1.8.6 before this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为 rubygems 1.3.x 需要 ruby 1.8.7,因此您可以先安装它。然后将 rubygems 更新到 1.3.7。通过
gem update --system
I think rubygems 1.3.x requires ruby 1.8.7 so you might install that first. Then update rubygems to 1.3.7. via
gem update --system
osx 中捆绑的 rubygems 版本使用 gemforge 作为其官方的 gem 来源 - 此后已被 gemcutter 取代。您应该能够
升级以更新最新版本的 ruby gems,然后它将使用 gemcutter 作为源链接
The version of rubygems bundled in osx uses gemforge as its offical source of gems - this has since been replaced with gemcutter. You should be able to do
To upgrade to update the latest version of ruby gems, which will then use gemcutter as the sources link
那是 rubygems 的一个非常旧的版本!你是怎么安装这个的?
是手动安装吗?如果是这样,也许您可以尝试以同样的方式手动升级。
That's a really old version of rubygems! How did you install this?
Is it a manual install? If so, perhaps you could try a manual upgrade the same way.
执行以下操作:
更新您安装的 RubyGems。然后,将 Github gem 存储库添加到您的源中。我建议使用 github,因为你会在那里找到很多有用的东西:
Do the following:
to update your install of RubyGems. Then, add the Github gem repository to your sources. I suggest github because you'll find a lot of useful things there: