# Wrong number of arguments (2 of 0)

**URL:** <https://www.ruby-forum.com/t/wrong-number-of-arguments-2-of-0/151712>\
**Category:** Rails\
**Created:** [October 24, 2008, 6:37pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-of-0/151712 "2008-10-24T18:37:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 24, 2008, 6:37pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-of-0/151712/1 "2008-10-24T18:37:30Z")

</div>

I’m new with RoR.  
I have a simple migration file:  
class CreateClubs \< ActiveRecord::Migration  
def self.up  
create\_table :clubs do |t|  
t.columns :name, :string  
t.columns :ref, :string  
t.columns :description, :string  
t.columns :local, :string

```
  t.timestamps
end

```

end

def self.down  
drop\_table :clubs  
end  
end

But I get this error message:

[…]  
Wrong number of arguments (2 of 0)  
./db/[…].rb:4:in ‘columns’  
[…]

What am I missing?  
Thank you for your help.

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 24, 2008, 6:40pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-of-0/151712/2 "2008-10-24T18:40:09Z")

</div>

Juste before trying to migrate thie table clubs, I did it fine with  
league:

class CreateLeagues \< ActiveRecord::Migration  
def self.up  
create\_table :leagues do |t|  
t.columns :name, :string  
t.columns :ref, :string  
t.columns :description, :string  
t.columns :category, :string

```
  t.timestamps
end

```

end

def self.down  
drop\_table :leagues  
end  
end

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 24, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-2-of-0/151712/3 "2008-10-24T19:30:16Z")

</div>

On Oct 24, 2008, at 9:40 AM, Thierry D. wrote:

> ```
> t.columns :category, :string
> 
> ```

Shouldn’t that be “t.column”? (no ‘s’). Or maybe even…

t.string :name  
…
