Skip to content

Instantly share code, notes, and snippets.

@jwieringa
Created August 18, 2012 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwieringa/3387435 to your computer and use it in GitHub Desktop.
Save jwieringa/3387435 to your computer and use it in GitHub Desktop.
power_enum install error on 1.8.7
  1. While running bundle install on a project, I ran into the following error:
ArgumentError: /Users/jason/.rbenv/versions/1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:72:in `parse': Illformed requirement ["#<YAML::Syck::DefaultKey:0x11418fa78> 0.2.1"]
An error occurred while installing power_enum (0.6.2), and Bundler cannot continue.
Make sure that `gem install power_enum -v '0.6.2'` succeeds before bundling.
  1. According to Bundle, it was getting hung up on an illformed Gemspec:
± bundle install
Invalid gemspec in [/Users/jason/projects/mobomo/export/trashThis/vendor/bundle/ruby/1.8/specifications/power_enum-0.6.2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x11615c8d8> 0.2.1"]
Invalid gemspec in [/Users/jason/projects/mobomo/export/trashThis/vendor/bundle/ruby/1.8/specifications/power_enum-0.6.2.gemspec]: Illformed requirement ["#<YAML::Syck::DefaultKey:0x11615c8d8> 0.2.1"]
  1. It seems that Syck (1.8 ruby support) library support has been dropped in favor of Pysch (starting 1.94?). http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html

Perhaps a bundler upgrade might do the trick as it might have a work around, but I am already using the latest --pre release of bundler. No go.

  1. It seems that this statement in the Gemspec of power_enum, "#YAML::Syck::DefaultKey:0x11615c8d8", is the culprit. https://skitch.com/jasonwieringa/epcr3/1-vim-vim
s.add_development_dependency(%q<genspec>, ["#<YAML::Syck::DefaultKey:0x11615c8d8> 0.2.1"])

So, I replaced the troubling statement with ">=". https://skitch.com/jasonwieringa/epcr7/1-vim-vim-2

s.add_development_dependency(%q<genspec>, [">= 0.2.1"])
  1. It works!! Yeah!! But... this seems like a really dirty way of fixing things… manually editing one of the Libraries?

Not sure how to fix in a clean way.

@benjaminoakes
Copy link

I've done the same fix before. I've never really found a "good" way of preventing this

@jwieringa
Copy link
Author

Hey thanks!! That is good to know, I really didn't feel right. :)

So it turns out the I thought I had the latest Bundler, but I didn't. Once upgrading from from 1.6 to 1.8 the issue was resolved. Bundler is smart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment