bundle install: tar_input.rb:111:in `initialize': No metadata found! #704
Comments
I cannot reproduce this. |
I tracked this down to a corrupt .gem file in rubygems/cache folder. I submitted a patch to the rubygems team to provide better diagnostic output message which identifies the offending file. It still doesn't address the root cause, but should help people find the problem faster. At line 111 in /rubygems/package/tar_input.rb, change to: unless has_meta |
Yep, same thing happened to me. "gem list" showed 2 gems, yet there were 3 in $GEM_HOME/cache. Deleted the odd man out and voila! Thanks :) |
I had the same issue caused by a failed install of Capybara 0.4.0 sitting in the cache. To get Capybara working (on Snow Leopard) I'd dropped down to 0.3.9. Going into the Rubygems cache and deleting the 0.4.0 gem and re-running 'bundle install' solved the problem. |
I've been hitting this issue with the htmlentities gem - putting a fresh copy of the gemfile into the cache didn't help. I'm attempting to install the htmlentities gem onto a new system via Bundler. When running bundle install --deployment --local Based on the suggestion at this page - http://codebeef.com/bundler-no-metadata-found-problem - we have patched tar_input.rb to provide further details. This yields the following: /opt/www/appname/vendor/cache/htmlentities-4.2.1.gem may be corrupt! Delete it and retry the operation Based on this error message, I had Bundler recache the gem, but hit the same issue again. I don't believe htmlentities to actually be corrupt, especially as I've run into this issue with a fresh cache of the gem file. Why would it appear as corrupt to Bundler? |
Thanks to a fast resolution from the author of htmlentities, version 4.2.2 of that specific gem resolves this issue. His fix:
However, now I'm running into this issue with another gem - json_pure-1.4.6.gem Is there any hope of getting a broader resolution to this issue, which is currently preventing bundle install from running? Thanks! |
I'm pretty sure this is a bug in REE that has just recently been fixed: http://code.google.com/p/rubyenterpriseedition/issues/detail?id=45 |
Thanks - we'll give the fix a try and will report back. |
We are still having an issue - I don't believe that this is related to the REE bug as suggested. We updated zlib to latest release ‘libz.so.1.2.5’, rebuilt REE again and still get the same error. Any other ideas? bundle install |
Have you tried deleting json_pure-1.4.6.gem and fetching a new copy with |
Thanks for the response. See above - I got a similar error message from htmlentities - it was not corrupt. I redownloaded it and tried again and still had the same issue. The author of the gem had to make a modification to prevent the error message. My gem cache is stored in git, so I don't think corruption is likely in this case. I don't get this error message for any of these gems on OS X, only on Linux with this REE install. Is there another way to confirm what the source of this error is? |
Unfortunately, there is no "broader resolution" possible for this issue -- you're seeing unique issues with individual, specific gems. The best I can do inside Bundler is just rescue the error and let you know which gem can't be read. It's not possible to "recover" from an invalid .gem file error. If you'd like to try it yourself, you can run this in e.g.
The output should let you know exactly what the problem is. |
Thanks - what I don't understand, though, is why does this issue exist only on my Linux server? The Gemfile runs fine on Mac OS X? I have seen 0 of these gem format errors on the Mac. |
This allows users with genuinely corrupt .gem files to know where they are located and delete them so Bundler can continue installing. Closes rubygems#704
Here is the command and stack trace. The offending gem seems to be 'shoulda':
Gemfile:
The text was updated successfully, but these errors were encountered: