Read more

Fix error: Invalid gemspec / Illformed requirement

Henning Koch
September 12, 2012Software engineer at makandra GmbH

When you get an error like this:

Invalid gemspec in [/opt/www/foo-project.makandra.de/shared/bundle/ruby/1.8/specifications/carrierwave-0.6.2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x7fda6f84d2e8> 1.1.4"]
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

... the machine's Rubygems needs to be updated.

If that happens on your local machine

  • Manually remove the offending's gem files and specifications. The paths will be something like /usr/lib/ruby/gems/1.8/gems/your-broken-gem and /usr/lib/ruby/gems/1.8/specifications/your-broken-gem
  • Update Rubygems or Slimgems by running gem update --system
  • Run bundler on your project to reinstall the offending gem.

If this happens to your during deployment

  • Ask your operations team to do it.
  • After the update, log onto the server and remove the broken Bundler cache directories like (e. g. shared/bundle)
  • Then redeploy.
Posted by Henning Koch to makandra dev (2012-09-12 11:27)