# Re: YAML failing to de-serialize

**URL:** <https://www.ruby-forum.com/t/re-yaml-failing-to-de-serialize/59402>\
**Category:** Rails\
**Created:** [May 3, 2006, 7:00pm UTC](https://www.ruby-forum.com/t/re-yaml-failing-to-de-serialize/59402 "2006-05-03T19:00:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kellan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a5b964/32.png) [@kellan](https://www.ruby-forum.com/u/kellan)\
**Post date:** [May 3, 2006, 7:00pm UTC](https://www.ruby-forum.com/t/re-yaml-failing-to-de-serialize/59402/1 "2006-05-03T19:00:13Z")

</div>

I’m seeing this same problem that Josh was seeing back on March 23rd  
(see below)

I’ve got the following YAML snippet stored in a text field:

“— !ruby/object:FieldValue \nattributes: \n item\_id: 60\n title:  
Test\n field\_id: 15\n created\_by\_id: 5\n locale: en\n link:  
[www.cclearn.com](http://www.cclearn.com)\n comment: this is a test\n created\_at: 2006-05-02  
15:43:14.256792 Z\nnew\_record: true\n”

When deserialize this using YAML.load and the FieldValue class is not  
loaded I successfully get a YAML::Object.

However is FieldValue is loaded I get an error:

NoMethodError: You have a nil object when you didn’t expect it!  
You might have expected an instance of Array.  
The error occured while evaluating nil.include?  
from  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active\_record/base.rb:1402:in  
`respond_to?' from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load’  
from (irb):34

This is with Rails 1.0

In my case I didn’t migrate from 1.8.2 to 1.8.4, but developed under  
1.8.2 and am now trying to deploy under 1.8.4 (not the best idea I  
acknowledged)

Any help?

Thanks  
-kellan
