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 Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)