Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigDecimal conversion doesn't work with 1.9.2p-180 #11

Open
lolow opened this issue Feb 24, 2011 · 2 comments
Open

BigDecimal conversion doesn't work with 1.9.2p-180 #11

lolow opened this issue Feb 24, 2011 · 2 comments

Comments

@lolow
Copy link

lolow commented Feb 24, 2011

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 `<<'
  /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:165:in `dump'
  activerecord (3.0.4) lib/active_record/base.rb:1719:in `block in arel_attributes_values'
  activerecord (3.0.4) lib/active_record/base.rb:1712:in `each'
  activerecord (3.0.4) lib/active_record/base.rb:1712:in `arel_attributes_values'
  activerecord (3.0.4) lib/active_record/persistence.rb:265:in `create'
  activerecord (3.0.4) lib/active_record/timestamp.rb:47:in `create'
  activerecord (3.0.4) lib/active_record/callbacks.rb:281:in `block in create'
  activesupport (3.0.4) lib/active_support/callbacks.rb:413:in `_run_create_callbacks'
  activerecord (3.0.4) lib/active_record/callbacks.rb:281:in `create'
  activerecord (3.0.4) lib/active_record/persistence.rb:246:in `create_or_update'
  activerecord (3.0.4) lib/active_record/callbacks.rb:277:in `block in create_or_update'
  activesupport (3.0.4) lib/active_support/callbacks.rb:423:in `_run_save_callbacks'
  activerecord (3.0.4) lib/active_record/callbacks.rb:277:in `create_or_update'
  activerecord (3.0.4) lib/active_record/persistence.rb:39:in `save'
  activerecord (3.0.4) lib/active_record/validations.rb:43:in `save'
  activerecord (3.0.4) lib/active_record/attribute_methods/dirty.rb:21:in `save'
  activerecord (3.0.4) lib/active_record/transactions.rb:240:in `block (2 levels) in save'
  activerecord (3.0.4) lib/active_record/transactions.rb:292:in `block in with_transaction_returning_status'
  activerecord (3.0.4) lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
  activerecord (3.0.4) lib/active_record/transactions.rb:207:in `transaction'
  activerecord (3.0.4) lib/active_record/transactions.rb:290:in `with_transaction_returning_status'
  activerecord (3.0.4) lib/active_record/transactions.rb:240:in `block in save'
  activerecord (3.0.4) lib/active_record/transactions.rb:251:in `rollback_active_record_state!'
  activerecord (3.0.4) lib/active_record/transactions.rb:239:in `save'
  activerecord (3.0.4) lib/active_record/associations/association_collection.rb:271:in `block in create'
  activerecord (3.0.4) lib/active_record/associations/association_collection.rb:502:in `block in create_record'
  activerecord (3.0.4) lib/active_record/associations/association_collection.rb:479:in `add_record_to_target_with_callbacks'
  activerecord (3.0.4) lib/active_record/associations/association_collection.rb:502:in `create_record'
  activerecord (3.0.4) lib/active_record/associations/association_collection.rb:269:in `create'
  /home/lolow/.bundler/ruby/1.9.1/vestal_versions-6273df533f85/lib/vestal_versions/creation.rb:51:in `create_version'
@adamcooper
Copy link
Owner

Hi,

Could you give me a bit more of a sample of how to reproduce this?

Thanks,
Adam

@lolow
Copy link
Author

lolow commented Mar 29, 2011

Hi,
Sorrry for the delay, here is the workaround:
https://github.com/collectiveidea/acts_as_audited/issues/48/#issue/48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants