# ArgumentError: wrong number of arguments

**URL:** <https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589>\
**Category:** Rails\
**Created:** [February 9, 2008, 2:00am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589 "2008-02-09T02:00:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickreilly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b782af/32.png) [@patrickreilly](https://www.ruby-forum.com/u/patrickreilly)\
**Post date:** [February 9, 2008, 2:00am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589/1 "2008-02-09T02:00:36Z")

</div>

Dear all,

I’m trying to build SimpleTicket - the latest build of which is  
available at [simpleticket.net&nbsp;-&nbsp;This website is for sale!&nbsp;-&nbsp;simpleticket Resources and Information.](http://simpleticket.net/latest.tar.gz). During the rake  
migrate, I encounter what appear to be errors when connecting to the  
MySQL database (although the call to the MySQL database isn’t happening  
yet as an ArgumentError occurs before this).

The INSTALL file states that Rails 1.1.6 is required. Here’s the  
versions of what I have installed on Ubuntu 7.10:

# ruby -v

ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux]

# rake --version

rake, version 0.8.1

# gem -v

0.9.5

My local gems are:

# gem li

\*\*\* LOCAL GEMS \*\*\*

actionmailer (1.2.5)  
actionpack (1.12.5)  
actionwebservice (1.1.6)  
activerecord (1.14.4)  
activesupport (1.3.1)  
builder (2.1.2)  
feedtools (0.2.28)  
rails (1.1.6)  
rake (0.8.1)  
uuidtools (1.0.3)

When I try to run ‘rake migrate’, the following error message occurs:

# rake migrate

(in /var/simpleticket)  
/var/simpleticket/config/boot.rb:28:Warning: require\_gem is obsolete.  
Use gem instead.  
rake aborted!  
wrong number of arguments (1 for 0)

The full trace is attached to this email.

Aside from this, webrick is listening on port 3000 and I get the nice  
login screen of SimpleTicket (but can’t log in due to the apparent MySQL  
problems).

Any help would be most appreciated.

Regards,

Patrick

---

<div class="post-metadata">

**Author:** ![patrickreilly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b782af/32.png) [@patrickreilly](https://www.ruby-forum.com/u/patrickreilly)\
**Post date:** [February 15, 2008, 7:33am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589/2 "2008-02-15T07:33:50Z")

</div>

Patrick Rynhart wrote:

> # rake migrate
> 
> (in /var/simpleticket)  
> /var/simpleticket/config/boot.rb:28:Warning: require\_gem is obsolete.  
> Use gem instead.  
> rake aborted!  
> wrong number of arguments (1 for 0)

Their code is outdated. Go into boot.rb and any other files with the  
same error and change ‘require\_gem’ to ‘gem’. (or run rake  
rails:update:configs)

Once you fix that problem, there will be plenty more. 🙂 You might want  
to give Mystic a try. It’s another decent ticketing program.

Here are some rake commands you might want to consider for your quest:

rake rails:freeze:edge  
Lock to latest Edge Rails or a specific revision with REVISION=X  
(ex: REVISION=4021) or a tag with TAG=Y (ex: TAG=rel\_1-1-0)

rake rails:freeze:gems  
Lock this application to the current gems (by unpacking them into  
vendor/rails)

rake rails:unfreeze  
Unlock this application from freeze of gems or edge and return to a  
fluid use of system gems

rake rails:update  
Update both configs, scripts and public/javascripts from Rails

\*\*\*rake rails:update:configs  
Update config/boot.rb from your current rails install

rake rails:update:javascripts  
Update your javascripts from your current rails install

rake rails:update:scripts  
Add new scripts to the application script/ directory

---

<div class="post-metadata">

**Author:** ![patrickreilly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b782af/32.png) [@patrickreilly](https://www.ruby-forum.com/u/patrickreilly)\
**Post date:** [February 26, 2008, 9:20am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589/3 "2008-02-26T09:20:01Z")

</div>

Hi Patrick,

That’s due the incompatibility with rails 1.1.6 and ruby 1.8.6. Please  
read my post on this issue for the work around.

regards  
Daniel

---

<div class="post-metadata">

**Author:** ![patrickreilly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b782af/32.png) [@patrickreilly](https://www.ruby-forum.com/u/patrickreilly)\
**Post date:** [February 26, 2008, 9:23am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589/4 "2008-02-26T09:23:51Z")

</div>

Daniel Goh wrote:

> Hi Patrick,
> 
> That’s due the incompatibility with rails 1.1.6 and ruby 1.8.6. Please  
> read my post on this issue for the work around.
> 
> regards  
> Daniel

Sorry I forgot to provide the link.

[http://www.railized.com/2008/2/17/wrong-argument-error-when-running-rails-1-1-6-with-ruby-1-8-6](http://www.railized.com/2008/2/17/wrong-argument-error-when-running-rails-1-1-6-with-ruby-1-8-6)

---

<div class="post-metadata">

**Author:** ![patrickreilly](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b782af/32.png) [@patrickreilly](https://www.ruby-forum.com/u/patrickreilly)\
**Post date:** [February 26, 2008, 9:39am UTC](https://www.ruby-forum.com/t/argumenterror-wrong-number-of-arguments/128589/5 "2008-02-26T09:39:24Z")

</div>

Thanks for this Daniel - it is most appreciated.

Regards,

Patrick
