Did you do that with the puppet lib enabled? I"m guessing there might a problem loading the yaml if you dont have the puppet classes ?

There's also a to_hash method (assuming you loaded puppet for this), so it can save the extra json conversions.