After upgrading from Rails 8.0.3 to Rails 8.1.0, my application crashes with an undefined method 'arity' for an instance of Hash error.
The issue appears to be related to the acts-as-taggable-on gem, which was automatically downgraded from version 12.0.0 to 5.0.0 during the Rails upgrade.
Environment:
Ruby: 3.4.4
Rails: 8.1.0 (upgraded from 8.0.3)
acts-as-taggable-on: 5.0.0 (downgraded from 12.0.0)
Database: MySQL2 0.5.6
Stack Trace:
/Users/macbookpro/.rbenv/versions/3.4.4/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/associations/builder/association.rb:54:in 'ActiveRecord::Associations::Builder::Association.build_scope'
/Users/macbookpro/.rbenv/versions/3.4.4/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/associations/builder/association.rb:48:in 'ActiveRecord::Associations::Builder::Association.create_reflection'
/Users/macbookpro/.rbenv/versions/3.4.4/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/associations/builder/association.rb:32:in 'ActiveRecord::Associations::Builder::Association.build'
/Users/macbookpro/.rbenv/versions/3.4.4/lib/ruby/gems/3.4.0/gems/activerecord-8.1.0/lib/active_record/associations.rb:1825:in 'ActiveRecord::Associations::ClassMethods#belongs_to'
/Users/macbookpro/.rbenv/versions/3.4.4/lib/ruby/gems/3.4.0/gems/acts-as-taggable-on-5.0.0/lib/acts_as_taggable_on/tagging.rb:7:in '<class:Tagging>'