諸行無常

IT色々お勉強中のブログ

Rail5.2.3アップグレードでArgumentError: wrong number of argumentsエラー発生

Rspec流して出たエラーはこれ

from /hogehoge/gems/will_paginate-3.1.6/lib/will_paginate/active_record.rb:140:in `select_for_count'```

will_paginateでエラー出てるっぽいから、PR調べてると、それっぽいの発見

ArgumentError: wrong number of arguments (given 0, expected 1) · Issue #589 · mislav/will_paginate · GitHub

active_recordのselect_for_countメソッドと被っちゃったっぽい 修正PRはすでに出ていた。ので

bundle update will_pagenate

で現在最新の3.1.7にあげたら解決