English 中文(简体)
命令破裂 Hash YAML 铁路序列化2.3.11?
原标题:broken OrderedHash YAML serialization in Rails 2.3.11?

我有复杂的数据结构,例如: 定购单Hash、钥匙是日期和价值被定有体积钥匙的ger。 我需要将这些期刊编成册,以便存放在 d。 但是,在“Yyaml/YAML”之后,有时数据被打破——一些二级斜体被替换为一级或副面。 有时,它没有破裂。

亚穆埃尔族代表认为这一点。

- 2011-07-10: !omap 
    - 00:00-01:00: 0
    - 01:00-02:00: 0
    - 02:00-03:00: 0
    - 03:00-04:00: 0
    - 04:00-05:00: 0
    - 05:00-06:00: 0
    - 06:00-07:00: 0
    - 07:00-08:00: 0
    - *id010
    - 09:00-10:00: 0
    - 10:00-11:00: 0
    - 11:00-12:00: 0
    - 12:00-13:00: 0
    - 13:00-14:00: 0
    - 14:00-15:00: 0
    - 15:00-16:00: 0
    - 16:00-17:00: 0
    - 17:00-18:00: 0
    - 18:00-19:00: 0
    - 19:00-20:00: 0
    - 20:00-21:00: 0
    - 21:00-22:00: 0
    - 22:00-23:00: 0
    - 23:00-23:59: 0

*id010/&id010部分随机插入亚穆埃尔不同地方。 我认为这会造成错误。

Does anybody have the idea of what is wrong with yaml serialization? ruby 1.8.6, upgrade to 1.9 isn t an option :(

最佳回答

很有可能出现ug。 我认为,国际奥马列发动机Rub.1.8的用途称为Syck,这一代码是多年前由_why创建的。 该法典自那时起一直没有得到适当维护。

Ruby 1.9本应使用一个叫做Psych的新发动机,但我不清楚这是否符合Rub1.8。

On Github I also found another alternative, which looks like it might be worth a try for you:
https://github.com/cesare/ruby-libc-libyaml

Syck (you might try this version, since it looks like it s being semi-maintained): https://github.com/indeyets/syck

Psych (you could also try and see if this runs on 1.8):
https://github.com/tenderlove/psych


http://www.ohchr.org。

也许“智者”也可以成为你们的一种选择。 看看to_json <>/code>方法,看看该方法是否可用于您的目的,或许会绕过《国际反马法》问题。

问题回答

我认为,这样做是因为你可能会有某种再入侵/自我干预结构,并且是处理这种结构的方法。





相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...