Bugs: Browse | Submit New | Admin
hoe 2.9.1's rake package fails with the following error: undefined method `write' for #<Syck::Emitter:0x00000100919d48> Related to RubyGems bug #28907: http://rubyforge.org/tracker/?func=detail&atid=575&aid=28907&group_id=126 In the above thread, Eric Hodel says: "Yes, you are loading syck (require 'yaml') before psych (require 'psych'): https://github.com/luislavena/rake-compiler/blob/master/lib/rake/ baseextensiontask.rb This is not supported. A patch will be sent to rake-compiler. You can work around this by requiring psych before rake-compiler." If this is *really* the case, then hoe needs to do the same: diff --git i/lib/hoe.rb w/lib/hoe.rb index efac489..771cb25 100644 --- i/lib/hoe.rb +++ w/lib/hoe.rb @@ -3,6 +3,12 @@ require 'rubygems' require 'rake' require 'rake/testtask' + +begin + require 'psych' +rescue ::LoadError +end + require 'yaml' require 'hoe/rake'
Add A Comment:
Date: 2011-08-12 23:19 Sender: Ryan Davis Thanks Leonard... much appreciated.
Date: 2011-08-12 23:18 Sender: Ryan Davis Roger, that's not relevant at all... Please don't litter my projects with your random musings.
Date: 2011-03-10 01:01 Sender: Roger Pack as a note, I get weird stuff like this when I build with 1.9.2 and jeweler: s.add_development_dependency(%q<active_support>, ["#<YAML::Syck::DefaultKey:0x7f01ada82158> 2.3.10"]) hmm