开发者

RubyGems - my system can't seem to find any remote gems to install

开发者 https://www.devze.com 2022-12-20 16:53 出处:网络
Trying to install the \'less\' gem.I type sudo gem install less as instructed at http://lesscss.org/, and I get the following error:

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 re开发者_如何学Gopository

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.


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


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


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.


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号