Skip to content

Instantly share code, notes, and snippets.

@malnick
Created January 9, 2014 18:45
Show Gist options
  • Save malnick/8339620 to your computer and use it in GitHub Desktop.
Save malnick/8339620 to your computer and use it in GitHub Desktop.
Ruby YAML to JSON error
root@bohr:/Users/malnick/projects/banyan/www → ruby -ryaml -rjson -e 'JSON.pretty_generate(YAML.load_file("last_run_report.yaml"))'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:334:in `path2class': undefined class/module Puppet:: (ArgumentError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:334:in `resolve_class'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:178:in `visit_Psych_Nodes_Mapping'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/visitor.rb:15:in `visit'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/visitor.rb:5:in `accept'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:20:in `accept'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:240:in `visit_Psych_Nodes_Document'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/visitor.rb:15:in `visit'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/visitor.rb:5:in `accept'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:20:in `accept'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/nodes/node.rb:35:in `to_ruby'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:130:in `load'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `block in load_file'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `load_file'
from -e:1:in `<main>'
root@bohr:/Users/malnick/projects/banyan/www →
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment