Open rsutphin opened 11 years ago
I got this error in Rails 3.2.22.5.
I fixed it by upgrading pg
gem from 0.11
to 0.18
The errors messages:
NoMethodError: undefined method `error_field' for #<PGresult:0x007f83548ca3f0>
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activesupport-3.2.22.5/lib/active_support/core_ext/object/try.rb:36:in `try'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/postgresql_adapter.rb:1149:in `translate_exception'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract_adapter.rb:284:in `rescue in log'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `execute'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/postgresql_adapter.rb:1266:in `select_raw'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/postgresql_adapter.rb:577:in `select_rows'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/adapters/postgresql_adapter.rb:19:in `insert_many'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/import.rb:541:in `block in import_without_validations_or_callbacks'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/import.rb:539:in `each'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/import.rb:539:in `each_slice'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/import.rb:539:in `import_without_validations_or_callbacks'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/import.rb:490:in `import_with_validations'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/import.rb:427:in `import_helper'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-import-0.16.1/lib/activerecord-import/import.rb:331:in `import'
/Users/khiav223577/Desktop/github/gem/atomically/lib/atomically/query_service.rb:22:in `create_or_plus'
/Users/khiav223577/Desktop/github/gem/atomically/test/create_or_plus_test.rb:21:in `block in test_pass_wrong_conflict_target_in_pg'
/Users/khiav223577/Desktop/github/gem/atomically/test/test_helper.rb:26:in `block in in_sandbox'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/Users/khiav223577/.rvm/gems/ruby-2.1.8/gems/activerecord-3.2.22.5/lib/active_record/transactions.rb:208:in `transaction'
/Users/khiav223577/Desktop/github/gem/atomically/test/test_helper.rb:25:in `in_sandbox'
/Users/khiav223577/Desktop/github/gem/atomically/test/create_or_plus_test.rb:19:in `test_pass_wrong_conflict_target_in_pg'
For someone wants more information: See this pull request
Several specs fail on AR 3.2.13 that did not fail on AR 3.2.12: