Adventures in HttpContext All the stuff after 'Hello, World'

Rails: Fixing Bundle “No Metadata Found” issues

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:

`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.