niceql: Logging incompatibility with ActiveRecord 7.0

Hello,

it seems the abstract log method from ActiveRecord changed signature to allow async usage: /activerecord-7.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:755

Resulting in an error when trying to destroy something:

> User.destroy_all
  User Load (0.6ms)
SELECT "users".*
  FROM "users"
  TRANSACTION (0.1ms)
BEGIN
  TRANSACTION (0.1ms)
ROLLBACK
ArgumentError: wrong number of arguments (given 6, expected 1..5)
from /Users/bob/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/activerecord-7.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:755:in `log'

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (9 by maintainers)

Commits related to this issue

Most upvoted comments

there is the thing I’ve faced: https://github.com/seattlerb/minitest/pull/891/files

undef_method was causing the troubles during test stubbing… and also one funny stuff blowed my mind: prepending module to a singleton_class. At some point I did that, just to imitate some behaviour on the class, and that also conflicts with the stub.

Thanks for bringing this up. I’ll try to close it till the end of big Russia’s holidays.