Closed miyucy closed 3 years ago
In Rails v6.1.0, ActiveRecord::ConnectionAdapters::ConnectionPool class does not have spec method.
ActiveRecord::ConnectionAdapters::ConnectionPool
spec
Issue #, if available:
Description of changes:
After upgrade to rails v6.1 at our product. aws-xray-sdk raise error.
like:
> Post.first NoMethodError: undefined method `spec' for #<ActiveRecord::ConnectionAdapters::ConnectionPool:0x00007fac1c415670> /app/vendor/bundle/ruby/2.7.0/gems/aws-xray-sdk-0.11.5/lib/aws-xray-sdk/facets/rails/active_record.rb:20:in `record' /app/vendor/bundle/ruby/2.7.0/gems/aws-xray-sdk-0.11.5/lib/aws-xray-sdk/facets/rails/active_record.rb:81:in `block in <main>' /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/notifications/fanout.rb:186:in `finish' /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/notifications/fanout.rb:63:in `block in finish' /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/notifications/fanout.rb:63:in `each' /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/notifications/fanout.rb:63:in `finish' /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/notifications/instrumenter.rb:45:in `finish_with_state' /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/notifications/instrumenter.rb:30:in `instrument' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:688:in `log' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:691:in `exec_cache' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:657:in `execute_and_clear' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:53:in `exec_query' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:536:in `select_prepared' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:67:in `select_all' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/connection_adapters/abstract/query_cache.rb:103:in `select_all' /app/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.0/lib/active_record/querying.rb:47:in `find_by_sql'
I think it causes ConnectionPool class was change in rails v6.1.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
This is solved in #57
Guess yours got missed @anuraaga
In Rails v6.1.0,
ActiveRecord::ConnectionAdapters::ConnectionPool
class does not havespec
method.Issue #, if available:
Description of changes:
After upgrade to rails v6.1 at our product. aws-xray-sdk raise error.
like:
I think it causes ConnectionPool class was change in rails v6.1.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.