Skip to content

Instantly share code, notes, and snippets.

@kevinmtrowbridge
Created September 28, 2011 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinmtrowbridge/1249385 to your computer and use it in GitHub Desktop.
Save kevinmtrowbridge/1249385 to your computer and use it in GitHub Desktop.
bundler error 'Gem::Package::TarInvalidError: tar is corrupt, name contains null byte'
When running 'bundle install', I randomly get this error:
Gem::Package::FormatError: corrupt gem (Gem::Package::TarInvalidError: tar is corrupt, name
contains null byte) in /Users/kmtrowbr/.rvm/gems/ruby-1.9.2-p290@hitrecord/cache/haml-3.1.2.gem
An error occurred while installing haml (3.1.2), and Bundler cannot continue.
Make sure that `gem install haml -v '3.1.2'` succeeds before bundling.
I am using RVM, I started troubleshooting by removing the 'corrupt' file, eventually progressing
all the way to doing an 'rvm implode' and reinstalling everything, including upgrading rails
1.9.2 to the newest version (p290) and upgrading bundler itself to 1.0.20.
Eventually I found that if I just delete the 'corrupt' file, and run bundler again, it
successfully installs that gem again, and continues through the Gemfile, until it randomly
fails again, while installing a different gem. If I delete that 'corrupt' file, it will
successfully continue, and so on -- until, after about 10 go-rounds, it successfully
finishes installing the Gemset.
Seems like it might be in some way related to these other errors:
https://github.com/carlhuda/bundler/issues/493
But I am using OSX and the standard Ruby.
See following all the information you request:
-----
Command I ran and the backtrace:
$ bundle
Updating git://github.com/railsdog/searchlogic.git
Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Using ZenTest (4.5.0)
Using abstract (1.0.0)
Using activesupport (3.0.10)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.10)
Using erubis (2.6.6)
Using rack (1.2.4)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.10)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.10)
Using arel (2.0.10)
Using activerecord (3.0.10)
Using activeresource (3.0.10)
Using addressable (2.2.6)
Using airbrake (3.0.3)
Using archive-tar-minitar (0.5.2)
Using authlogic (3.0.3)
Using autotest (4.4.6)
Using sys-uname (0.8.6)
Using autotest-fsevent (0.2.5)
Using autotest-growl (0.2.11)
Using autotest-rails (4.1.1)
Using xml-simple (1.0.12)
Using aws-s3 (0.6.2)
Using bcrypt-ruby (3.0.0)
Using bundler (1.0.20)
Using highline (1.6.2)
Using net-ssh (2.1.4)
Using net-scp (1.0.4)
Using net-sftp (2.0.5)
Using net-ssh-gateway (1.1.0)
Using capistrano (2.8.0)
Using nokogiri (1.5.0)
Using ffi (1.0.9)
Using childprocess (0.2.2)
Using json_pure (1.6.1)
Using rubyzip (0.9.4)
Using selenium-webdriver (2.7.0)
Using xpath (0.1.4)
Using capybara (1.1.1)
Using cocaine (0.2.0)
Using columnize (0.3.4)
Using css_parser (1.2.5)
Using daemon_controller (0.2.6)
Using daemons (1.1.4)
Using diff-lcs (1.1.3)
Using factory_girl (2.1.2)
Using rdoc (3.8)
Using thor (0.14.6)
Installing railties (3.0.10)
Installing factory_girl_rails (1.2.0)
Installing fastthread (1.0.7) with native extensions
Installing ffaker (1.8.1)
Gem::Package::FormatError: corrupt gem (Gem::Package::TarInvalidError: tar is corrupt, name contains null byte) in /Users/kmtrowbr/.rvm/gems/ruby-1.9.2-p290@hitrecord/cache/haml-3.1.2.gem
An error occured while installing haml (3.1.2), and Bundler cannot continue.
Make sure that `gem install haml -v '3.1.2'` succeeds before bundling.
macbook:~/ci/git/hitrecord/rails$ gem install haml -v '3.1.2'
ERROR: Error installing haml:
invalid gem format for /Users/kmtrowbr/.rvm/gems/ruby-1.9.2-p290@hitrecord/cache/haml-3.1.2.gem
-----
Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.10'
gem 'linecache19', '0.5.12'
# Bundle the extra gems:
gem 'abstract', '1.0.0'
gem 'airbrake', '3.0.3'
gem 'archive-tar-minitar', '0.5.2'
# gem 'arel', '2.2.1'
# gem 'authlogic', '2.1.6'
gem 'authlogic'
gem 'aws-s3', '0.6.2'
gem 'bcrypt-ruby', '3.0.0'
gem 'capistrano', '2.8.0'
gem 'cocaine', '0.2.0'
gem 'columnize', '0.3.4'
gem 'daemon_controller', '0.2.6'
gem 'daemons', '1.1.4'
gem 'erubis', '2.6.6'
gem 'fastthread', '1.0.7'
gem 'haml', '3.1.2'
gem 'highline', '1.6.2'
gem 'html_truncator', '0.2.3'
# gem 'i18n', '0.6.0'
gem 'mail', '2.2.19'
gem 'mime-types', '1.16'
gem 'mira', '0.0.1'
gem 'multi_json', '1.0.3'
gem 'mysql', '2.8.1'
gem 'net-scp', '1.0.4'
gem 'net-sftp', '2.0.5'
gem 'net-ssh', '2.1.4'
gem 'net-ssh-gateway', '1.1.0'
gem 'newrelic_rpm', '3.1.1'
gem 'nokogiri', '1.5.0'
gem 'open4', '1.1.0'
gem 'paperclip', '2.4.1'
gem 'passenger', '3.0.7'
gem 'polyglot', '0.3.2'
gem 'rack-mount', '0.6.14'
gem 'rack-test', '0.5.7'
gem 'rake', '0.9.2'
gem 'rdoc', '3.8'
gem 'rest-client', '1.6.3'
gem 'right_aws', '2.1.0'
gem 'right_http_connection', '1.3.0'
gem 'ruby-mp3info', '0.6.15'
gem 'ruby_core_source', '0.1.5'
gem 'ruby_parser', '2.0.6'
gem 'rubygems-update', '1.8.6'
# Kevin says: Looks like MetaSearch is a little more modern and maintained, should
# switch over if we're doing any work with the searching:
# http://railscasts.com/episodes/251-metawhere-metasearch?view=comments
# http://www.rubyflow.com/items/4521
# http://craiccomputing.blogspot.com/2010/10/searchlogic-versus-metasearch-and.html
# gem 'searchlogic', '2.5.8'
gem 'rd_searchlogic', :require => 'searchlogic', :git => 'git://github.com/railsdog/searchlogic.git'
gem 'sexp_processor', '3.0.5'
gem 'test-unit', '1.2.3'
gem 'thor', '0.14.6'
gem 'treetop', '1.4.10'
gem 'tzinfo', '0.3.29'
gem 'viddler-ruby', '0.1.1'
gem 'will_paginate', '2.3.16'
gem 'xml-simple', '1.0.12'
# Kevin says: Gem declarations moved over from Rails 2
# era environment.rb file ...
# gem 'tobi-delayed_job', :require => 'delayed_job'
gem 'css_parser'
# fixes Viddler fail, migrates to v2 of Viddler API
# gem 'mira'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :development, :test do
gem 'ruby-debug19'
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'capybara'
gem 'ffaker'
gem 'rcov'
# Autotest
gem 'autotest'
gem 'ZenTest'
gem 'autotest-rails'
gem 'autotest-fsevent'
gem 'autotest-growl'
# Fast tests with Spork -- really neat!
# http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.html
gem 'spork', '~> 0.9.0.rc'
end
-----
$ bundle config
Settings are listed in order of priority. The top value will be used.
-----
$ bundle -v
Bundler version 1.0.20
-----
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
-----
$ gem -v
1.8.10
-----
$ rvm -v
rvm 1.8.5 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
-----
Not using rubygems-bundler
-----
Not using open_gem
-----
OSX 10.6.8
-----
Using 'homebrew' to install various development packages -- perhaps some tar package that's messed up?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment