开发者

how to fix getting 'invalid gem format' for every gem

I've been googling this for awhile. The most relevant post seems to be this:

http://www.ruby-forum.com/topic/200151

I've updated gem to 1.3.5 and installed (from local) the rubygems-update-1.3.5.gem and then ran gem update --system. The update gem said it installed successfully and the gem update --system command returns with 'Nothing to update'. The link above suggests doing this with debug and verbose, which I've done, with the output below:

C:\InstantRails2-0\rails_apps\rftg>gem update --system --debug -V
Exception `NameError' at C:/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager
.rb:161 - uninitialized constant Gem::Commands::UpdateCommand
Exception `Gem::LoadError' at C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:827 - C
ould not find RubyGem test-unit (>= 0)

Updating RubyGems
Exception `Gem::LoadError' at C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:827 - R
ubyGem version error: sources(0.0.1 not > 0.0.1)

GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz
Exception `Errno::EEXIST' at C:/ruby/lib/ruby/1.8/fileutils.rb:243 - File exists
 - C:\Documents and Settings\prestonb/.gem/specs/gems.rubyforge.org%80
Nothing to update

I'm not sure what all that mean开发者_运维问答s. However, I did try to load from the gemcutter and s3.amazon and those are blocked (I'm behind a firewall).


Can you install gem files locally (i.e., from a .gem file?) If you can, the problem is your network connection.

I don't understand what you mean by behind a firewall. Do you mean a proxy server? You may need to use the -p option on gem to point to your proxy server.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜