similar to: De-serializing attribute gives YAML::Objects?

Displaying 20 results from an estimated 30000 matches similar to: "De-serializing attribute gives YAML::Objects?"

2006 May 02
0
YAML failing to de-serialize
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\n comment: this is a test\n created_at: 2006-05-02 15:43:14.256792 Z\nnew_record:
2006 Aug 11
0
serializing / deserializing active records with children
What is the best approach to serialize / deserialize full blown active record objects with multiple child objects (one-to-many relations). YAML::load(), YAML::dump() almost work :) -> loaded object has children (I see them in breakpoint session: "puts parent"), but when I am accessing children (e.g: "puts parent.emails") array becomes cleared - I guess rails are trying to
2011 Mar 09
1
ActiveRecord serialize method not returning YAML array in test environment.
Hello, I''ve got a problem with deserialization of AR "serialize" method (http://apidock.com/rails/ActiveRecord/Base/serialize/class) in my tests. It just gives me pure String instead of my data Array. Example: User > AR::Base serialize :roles, Array end Console: u = User.new u.roles = ["admin", "support"] u.save # => true User.first.roles # =>
2006 Jul 10
1
Serializing objects to the database
I have a rails app that has a search mechanism with a bunch of options. I''ve consolidated all the search parameters into a SearchQuery class. Now I want to store searches to be recalled later. I searched the wiki but couldn''t find any pages about how to do this best. I''m worried that if I just serialize the object I won''t be able to change the class without
2005 Dec 02
3
yaml Error When Trying to Generate Scaffold
Hello there, I am a Ruby on Rails newbie, and have been reading the book, "Agile Web Development with Rails", by Dave Thomas. Seem to be stuck on page 57, when trying to invoke "ruby script/ generate scaffold Product Admin"... My depot/config/database.yml file''s contents are: development: adapter: mysql database: depot_development socket:
2012 Jul 05
1
hash to_yaml in erb template not giving valid yaml
Hi, I want to use a file resource to write a facts.yaml file for Mcollective. For some reason it won''t provide a valid yaml format if I dump my scope to hash and convert to_yaml. file { "/etc/mcollective/facts.yaml" : owner => root, group => root, mode => 400, loglevel => debug, #content => inline_template("<%= scope.to_hash.reject {
2019 Dec 02
2
llvm-9-dev apt package missing yaml-bench
Hello everyone I was just porting a project to build against the LLVM 9 apt packages and noticed that the issue I filed and explained during the release phase in https://llvm.org/PR43035 still persists: CMake Error at /usr/lib/llvm-9/lib/cmake/llvm/LLVMExports.cmake:1323 (message):   The imported target "yaml-bench" references the file      "/usr/lib/llvm-9/bin/yaml-bench"
2006 Nov 01
0
Re: YAML.load(some_string) doesn't return hash?
Oleg Kh wrote: > 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: > > #<YAML::Syck::DomainType:0x36d5038 > @domain="yaml.org,2002", > @type_id="map:HashWithIndifferentAccess", >
2007 Aug 02
0
Deserializing objects in the controller
I''ve an AR model that serializes another object (A), which does not inherit from ActiveRecord::Base. The problem I''m facing is that while A can be deserialized properly in script/console, it deserializes as YAML::Object in the controller. This means that the methods on A are not available on the deserialized instance and I receive NoMethodError messages. I''ve tried to
2019 Dec 03
2
llvm-9-dev apt package missing yaml-bench
On 02/12/2019 15:21, Sylvestre Ledru wrote: > yaml-bench is shipping in libclang-common-9-dev Ok possible. Though, it adds an unnecessary 46MB to my docker image. > It should be indeed in llvm-9-dev instead. This would hide the problem, right. I am not sure it's is a good solution. Where can we review the build process for the apt packages? On 02/12/2019 15:21, Sylvestre Ledru wrote:
2007 Apr 18
1
YAML serialization
Hi, something wrong with ActiveRecord or YAML? They don''t put Strings into Quotes when it serializes. This gave me trouble when I serialized a String with a double colon (eg. ''key: value''). After AR unserialized the Value it became a Hash since a String ''key: value'' becomes attribute[:key] => value... :( Sincerely Florian
2012 Oct 23
0
[LLVMdev] Status of YAML IO?
On Oct 22, 2012, at 4:40 PM, Sean Silva wrote: > Hey Nick, what's the status on YAML IO? The other thread seems to have died.\ I'm waiting on Michael Spencer's feedback. The issues I know of right now are: 1) Should we structure YAML I/O to be a more general I/O utility that could support reading and writing other data formats such as JSON or plists. RIght now, all the code is
2009 Aug 07
1
Yaml for jqgrid
Anyone have a more extensive yaml file for jqgrid than the one that''s shown with the example Jqgrid Demos page? Also, I''ve been successful in just using the straight jQuery javascript code, rather than invoking the yaml file to produce it), but sometimes get an "unitialized class variable @@grid_name" error. I was doing this because all the code I see on the web to
2012 Jan 24
1
bugzilla + centos 5.7 + yaml errors
Hi all, Struggling with installing ol Bugzy 4.0.3 onto Centos 5.7. When I run the checksetup.pl script included with Bugzilla, I get the message; /usr/bin/perl install-module.pl Email::MIME So I run this from the command line and get YAML errors; Checking for YAML (any) not found I had installed YAML via; yum install *YAML* The package perl-YAML-0.72-1.el5.rf.noarch
2006 Jul 24
0
HTML YAML Builder
Is anyone interested in a YAML Builder for HTML? Some trivial YAML that could be converted to HTML: html: - head: - title: My title - body: - p: - {!id: someId, !class: class1 class2} - Hello - img: {!src: someurl.gif} - hr: - ul: [{!id: someId}, {li: hello}, {li: goodbye}] - ul: - {!style: "height: 30px"} - li: [{!id: first}, First] -
2013 Mar 11
0
[LLVMdev] YAML IO problems
I'm trying to parse a simple JSON file, and am having problems with using YAMLIO. FWIW, I see the unit test YAMLIOTest.cpp is disabled with a #if 0. Anyway, the JSON file yaml.json contains: { "bool_test": true, "directory": ".", "suffix": "_test", "int_test": 4 } The test program when run shows: YAML:5:15: error: invalid
2008 Apr 16
2
Question about yaml. Thank you !!
Hi friends: I tried to convert a model object to yaml(use to_yaml method), and after that, I would like to convert the yaml(string type) back to the model object. But when I use YAML::load to do that, it failed, the return object''s class is Yaml class, not my prior model class.. Please tell me how can I do to convert yaml to an object as the prior model class, or how can I access the
2009 Oct 12
2
yaml ?nodes? or nested maps
I want to iterate ?nodes? and ?leafs? for a yaml document: thufir@ARRAKIS:~/projects/rss$ thufir@ARRAKIS:~/projects/rss$ ruby user.rb user.rb:6: undefined method `[]'' for nil:NilClass (NoMethodError) from user.rb:5:in `each_key'' from user.rb:5 thufir@ARRAKIS:~/projects/rss$ thufir@ARRAKIS:~/projects/rss$ ruby user2.rb user2.rb:5: undefined method `[]'' for
2008 Mar 25
0
New package: yaml 1.0 released to CRAN
Hi all, I've released a new package to CRAN called 'yaml'. It allows R to parse YAML documents (http://yaml.org) into R objects, and there are a few methods to convert R objects into YAML. The package uses the Syck YAML parser (http://whytheluckystiff.net/syck/), the same parser that Ruby and other languages use to parse YAML. For more information, please visit:
2008 Mar 25
0
New package: yaml 1.0 released to CRAN
Hi all, I've released a new package to CRAN called 'yaml'. It allows R to parse YAML documents (http://yaml.org) into R objects, and there are a few methods to convert R objects into YAML. The package uses the Syck YAML parser (http://whytheluckystiff.net/syck/), the same parser that Ruby and other languages use to parse YAML. For more information, please visit: