Rails: Fixing Bundle “No Metadata Found” issuesNov 14 2010
In playing around with Rails this weekend, I ran into an annoying error when trying to set up some bundles- specifically with Webrat and Cucumber, which I found very odd:
/Users/Michael/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/package/tar_input.rb:111:in `initialize': No metadata found! (Gem::Package::FormatError)
Removing the dependencies in my Gemfile fixed the issue, but obviously left me without Cucumber and Webrat gems.
Googling didn’t provide an immediate solution to my problem, which is why I’m writing this post. An issue hidden in the Bundle Github tracker had a solution: delete the cache directory in your Ruby’s gem directory. The problem isn’t necessarily specific to Webrat or Cucumber; the problem appears to be when the cache directory gets out of sync with the actual repository, and gems which should be installable cannot be found.
After deleting the cache, bundle install ran without error with my new Webrat and Cucumber gems.