'Query method issue on rails upgrade to 6.1.5

enter image description here

Upgraded rails from 6.0.3 to 6.1.5 but having issues with query methods like eager_load and references.

class Note < ApplicationRecord
      has_many :sellers
end

class Seller < ApplicationRecord
      belongs_to :note
end

So when I try Note.eager_load(:sellers) or Note.includes(:sellers).references(:sellers) an ArgumentError occurs:

ArgumentError (expected 5 got 6)

Is it something related to rails upgrade issue or Did I miss something when upgrading rails.



Solution 1:[1]

To all those concerned, It was because of rails_select_on_includes gem which is not needed anymore after 6.0.3.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Samir Lama