Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Error running in Rails 5.1.2 - 3 argument initialze of JoinAssociation #45

Closed
kaoru opened this issue Aug 8, 2018 · 2 comments
Closed

Comments

@kaoru
Copy link

kaoru commented Aug 8, 2018

I'm getting a different error running in Rails 5.1.2

Exception: ArgumentError: wrong number of arguments (given 3, expected 2)

  0: /Users/alex/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.2.1/lib/active_record/associations/join_dependency/join_association.rb:12:in `initialize'
  1: /Users/alex/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/polyamorous-1.3.3/lib/polyamorous/activerecord_5.2_ruby_2/join_association.rb:19:in `initialize'
  2: /Users/alex/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/polyamorous-1.3.3/lib/polyamorous/activerecord_5.2_ruby_2/join_dependency.rb:28:in `new'
  3: /Users/alex/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/polyamorous-1.3.3/lib/polyamorous/activerecord_5.2_ruby_2/join_dependency.rb:28:in `block in build'
  4: /Users/alex/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/polyamorous-1.3.3/lib/polyamorous/activerecord_5.2_ruby_2/join_dependency.rb:8:in `each'
  5: /Users/alex/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/polyamorous-1.3.3/lib/polyamorous/activerecord_5.2_ruby_2/join_dependency.rb:8:in `map'
...

Polyamorous is calling super(reflection, children, alias_tracker) but the 5.1.2 version of ActiveRecord::Associations::JoinDependency::JoinAssociation only takes two arguments to initialize.

At least i think that's the problem? It's a bit of a maze 😅

Let me know if I can provide any extra info 💞

@gregmolnar
Copy link
Member

Please point you Gemfile to Ransack's master.

@kaoru
Copy link
Author

kaoru commented Aug 9, 2018

Seems to have done the trick, thanks @gregmolnar! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants