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 online protection

Rails professionals since 2007

Our laser focus on a single technology has made us a leader in this space. Need help?

  • We build a solid first version of your product
  • We train your development team
  • We rescue your project in trouble
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)