amistad icon indicating copy to clipboard operation
amistad copied to clipboard

Wrong number of arguments (3 for 2)

Open Javed43 opened this issue 10 years ago • 1 comments

I have installed amistad and after the installation when I'm unable to start the server as it giving an error.

/home/mohd.hussain/.rvm/gems/ruby-1.9.3-p484@partyapp/gems/activerecord-3.2.14/lib/active_record/associations.rb:1197:in has_many': wrong number of arguments (3 for 2) (ArgumentError) from /home/mohd.hussain/.rvm/gems/ruby-1.9.3-p484@partyapp/gems/amistad-0.10.2/lib/amistad/active_record_friend_model.rb:14:inblock in module:ActiveRecordFriendModel' from /h

I'm using ruby - 1.9.3 and rails 3.2.14

What am I doing wrong

Javed43 avatar Nov 10 '14 04:11 Javed43

I believe this is an incompatibility between Rails 3.2 and this has_many statement:

has_many  :pending_invited, -> { where(:'friendships.pending' => true, :'friendships.blocker_id' => nil) }, :through => :friendships, :source => :friend

This problem can be avoided by downgrading to version 0.9.2.

nguyen-brian avatar Dec 30 '15 18:12 nguyen-brian