Wellington1993 Wellington1993 - 1 year ago 78
Ruby Question

Ruby on Rails: NoMethodError undefined method `get_yaml' for String

I tried to deploy a non public project but sometimes when tried to use
report pages (based on prawn) I have this problem:

NoMethodError (undefined method `get_yaml' for #<String:0x7fdecffd3738>):

The piece of code is:

report_content = report.draw(report_content.get_yaml)

Someone know: where are get_yaml come from?


Answer Source

The method #get_yaml is not a part of of the standard Ruby library, although #to_yaml is defined if the yaml library has been loaded. #get_yaml, if it exists, is defined by the application or by some library that the application is loading.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download