# ArgumentError (wrong number of arguments (2 for 1))

**URL:** <https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-2-for-1/74525>\
**Category:** Rails\
**Created:** [November 7, 2006, 10:47am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-2-for-1/74525 "2006-11-07T10:47:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_Van\_Hoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@Ian\_Van\_Hoven](https://www.ruby-forum.com/u/Ian_Van_Hoven)\
**Post date:** [November 7, 2006, 10:47am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-2-for-1/74525/1 "2006-11-07T10:47:16Z")

</div>

ok, starting to get a tad frustrated. rails ActiveRecord::Base docs…

> **[ActiveRecord::Base](https://api.rubyonrails.org/classes/ActiveRecord/Base.html#M000860)**
>
> Active Record Active Record objects don't specify their attributes directly, but rather infer them from the table definition with which they're linked.

…show the basic use of the find method to be as so:

Person.find(1) # returns the object for ID = 1

…but when i do the exact same method call in my code, i get this  
error…

ArgumentError (wrong number of arguments (2 for 1))

this only started after i upgraded to 1.1.6.

what gives? any help appreciated, this basic method failing is doing a  
great job of holding me up 😉

thanks in advance.

---

<div class="post-metadata">

**Author:** ![Ian\_Van\_Hoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@Ian\_Van\_Hoven](https://www.ruby-forum.com/u/Ian_Van_Hoven)\
**Post date:** [November 7, 2006, 10:47am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-2-for-1/74525/2 "2006-11-07T10:47:17Z")

</div>

post some more of your log so we can see where it’s failing exactly.

also, are you using any plugins that modify/extend ActiveRecord?

ed

---

<div class="post-metadata">

**Author:** ![Ian\_Van\_Hoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@Ian\_Van\_Hoven](https://www.ruby-forum.com/u/Ian_Van_Hoven)\
**Post date:** [November 7, 2006, 10:47am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-2-for-1/74525/3 "2006-11-07T10:47:23Z")

</div>

On Mon, 2006-10-30 at 08:42 -0800, Ian Van Hoven wrote:

> ArgumentError (wrong number of arguments (2 for 1))
> 
> this only started after i upgraded to 1.1.6.
> 
> what gives? any help appreciated, this basic method failing is doing a  
> great job of holding me up 😉

* * *

I’d say that what is holding you up is not understanding what is  
happening.

(wrong number of arguments (2 for 1) is like doing…

Person.find(1, 2)

which I think doesn’t work (haven’t tested it)

Person.find(:all, :conditions =\> [“id = ‘1’ || id = ‘2’”]) should work

You might want to show us the actual code.

Craig

---

<div class="post-metadata">

**Author:** ![Ian\_Van\_Hoven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/53a042/32.png) [@Ian\_Van\_Hoven](https://www.ruby-forum.com/u/Ian_Van_Hoven)\
**Post date:** [November 7, 2006, 10:47am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments-2-for-1/74525/4 "2006-11-07T10:47:31Z")

</div>

think i figgered it out…

“records - a table named records seemed to cause duplicate entries to  
be found by find”

my bad for naming a table Records in my jukebox app ☹

apologies for the spam.
