A small problem here. As per documentation on http://corelib.rubyonrails.org/classes/YAML.html YAML.load(string)
should just return a hash. However on my windows machine it returns
something like this:
Obviously, on windows machine I have to do something like
YAML.load(something).value[‘key’] to get something. On Linux box .value
method will fail as we only get a simple hash there.
A small problem here. As per documentation on http://corelib.rubyonrails.org/classes/YAML.html YAML.load(string)
should just return a hash. However on my windows machine it returns
something like this:
Obviously, on windows machine I have to do something like
YAML.load(something).value[‘key’] to get something. On Linux box .value
method will fail as we only get a simple hash there.
Any idea what is goin on? A bug?
Now, I am seeing this problem, too, but in serializing.
Specifically, I have a field that’s serialized in my model. This works
fine going back and forth to a hash in Locomotive in development. But,
in production on DreamHost, the deseralization ends up like this:
Thus, of course, I can’t use the hash methods. And Rails then generates
errors like “undefined method `include?’ for
#YAML::Syck::DomainType:0x407fb584”
I’m using Rails 1.1.6, and so is DreamHost. Does anyone have any ideas
what’s going on?
-Paul
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.