RubyGems - 我的系统似乎找不到任何要安装的远程 gem

发布于 2024-08-22 04:58:59 字数 1083 浏览 7 评论 0原文

尝试安装“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,都无法在任何存储库中找到它。我检查了我的环境,并列出了 ruby​​forge:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

救赎№ 2024-08-29 04:58:59

我认为 ruby​​gems 1.3.x 需要 ruby​​ 1.8.7,因此您可以先安装它。然后将 ruby​​gems 更新到 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

忆悲凉 2024-08-29 04:58:59

osx 中捆绑的 ruby​​gems 版本使用 gemforge 作为其官方的 gem 来源 - 此后已被 gemcutter 取代。您应该能够

sudo gem update --system

升级以更新最新版本的 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

sudo gem update --system

To upgrade to update the latest version of ruby gems, which will then use gemcutter as the sources link

執念 2024-08-29 04:58:59

那是 ruby​​gems 的一个非常旧的版本!你是怎么安装这个的?

是手动安装吗?如果是这样,也许您可​​以尝试以同样的方式手动升级

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.

佼人 2024-08-29 04:58:59

执行以下操作:

sudo gem update --system

更新您安装的 RubyGems。然后,将 Github gem 存储库添加到您的源中。我建议使用 github,因为你会在那里找到很多有用的东西:

sudo gem sources -a http://gems.github.com

Do the following:

sudo gem update --system

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:

sudo gem sources -a http://gems.github.com
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文