ruby 3.0.0: undefined method `arity' for
clwy-cn opened this issue · 4 comments
clwy-cn commented
This error is only in ruby 3.0.0
if I use ruby 2.6.6 or 2.7.2,it works fine.
My Rails version is 6.1.0
This code is causing the problem:
acts_as_nested_set
undefined method `arity' for {:class_name=>"Guide::Page", :foreign_key=>"parent_id", :primary_key=>"id", :counter_cache=>:children_count, :inverse_of=>:children, :polymorphic=>false, :touch=>false, :optional=>true}:Hash
parndt commented
Does it work properly if you use the repo version?
gem 'awesome_nested_set', github: 'collectiveidea/awesome_nested_at', branch: 'master'
parndt commented
Alternatively, those changes are now available using version 3.3.0:
gem 'awesome_nested_set', '~> 3.3.0'
damianlegawiec commented
This is fixed with 3.3.x , thank you @parndt
parndt commented
Thanks to @krisdigital