vestal_versions
vestal_versions copied to clipboard
BigDecimal conversion doesn't work with 1.9.2p-180
I have just upgrade ruby 1.9.2 to 1.9.2.p180 and I have this error when converting the changes into yaml
TypeError (can't define singleton method "encode_with" for BigDecimal): /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/deprecated.rb:16:in `singleton_method_added' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/deprecated.rb:16:in `define_method' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/deprecated.rb:16:in `quick_emit' activesupport (3.0.4) lib/active_support/core_ext/big_decimal/conversions.rb:15:in `to_yaml' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:55:in `accept' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:246:in `block in visit_Array' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:246:in `each' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:246:in `visit_Array' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:63:in `accept' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:227:in `block in visit_Hash' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:225:in `each' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:225:in `visit_Hash' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:63:in `accept' /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:36:in `
Hi,
Could you give me a bit more of a sample of how to reproduce this?
Thanks, Adam
Hi, Sorrry for the delay, here is the workaround: https://github.com/collectiveidea/acts_as_audited/issues/48/#issue/48