无法安装宝石 - tar已损坏

时间:2011-10-26 03:33:33

标签: ruby-on-rails ruby

brandon$ bundle
Fetching source index for http://rubygems.org/
Using rake (0.9.2.2) 
Using log4r (1.1.9) 
Using XMLCanonicalizer (1.0.1) 
Using multi_json (1.0.3) 
Using activesupport (3.1.1) 
Using builder (3.0.0) 
Using i18n (0.6.0) 
Using activemodel (3.1.1) 
Using erubis (2.7.0) 
Using rack (1.3.5) 
Using rack-cache (1.1) 
Using rack-mount (0.8.3) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.0.3) 
Using actionpack (3.1.1) 
Using mime-types (1.17.1) 
Using polyglot (0.3.2) 

Gem::Package::FormatError: corrupt gem (Gem::Package::TarInvalidError: tar is corrupt, name contains null byte) in /Users/brandon/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/cache/treetop-1.4.10.gem
An error occured while installing treetop (1.4.10), and Bundler cannot continue.
Make sure that `gem install treetop -v '1.4.10'` succeeds before bundling.

我删除了ruby和rvm,安装了rbenv并重新安装了ruby。这是1.9.3-rc1,但同样的事情发生在1.9.2-p290。我试过删除/Users/brandon/.rbenv/versions/1.9.3-rc1/lib/ruby/gems/1.9.1/cache/无济于事。我不知道在这一点上转向何方。

此外,树梢宝石并不总是会发生。其他时候,它与activemodel或其他宝石。

1 个答案:

答案 0 :(得分:3)

看起来你的连接有问题(假设你在防火墙后面)。 尝试使用其他互联网连接(如移动宽带)。