# Processing PersonController#create (for 192.168.1.50 at 2007-07-20 10:19:55) \[POST\] ArgumentError in PersonController#create : wrong number of arguments (1 for 0)

**URL:** <https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924>\
**Category:** rubyonrails-talk\
**Created:** [July 20, 2007, 5:35pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924 "2007-07-20T17:35:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 20, 2007, 5:35pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/1 "2007-07-20T17:35:48Z")

</div>

New to rails, trying to do a pretty vanilla test-run app.

Here's the beginning of a log dump from the subject error (with a little formatting for readability):

Processing PersonController#create (for 192.168.1.50 at 2007-07-20 10:19:55) [POST] &nbsp;&nbsp;Session ID: 41bc1e6351c24a63c12f97354da28e08 &nbsp;&nbsp;Parameters: {"commit"=\>"Create", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"action"=\>"create", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"controller"=\>"person", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"person"=\>{"first\_name"=\>"Fred", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"last\_name"=\>"Flintstone", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"email"=\>"fred@bedrock.com"}}

Neither this nor the rest of the log is telling me much 🙂

How do you go about troubleshooting something like this?

TIA!

/\* ruby 1.8.6 + rails 1.2.3 on SuSE Linux if that matters...\*/

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 20, 2007, 6:26pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/2 "2007-07-20T18:26:39Z")

</div>

OK, here's the entire log sequence:

Processing PersonController#create (for 192.168.1.50 at 2007-07-20 10:19:55) [POST] &nbsp;&nbsp;Session ID: 41bc1e6351c24a63c12f97354da28e08 &nbsp;&nbsp;Parameters: {"commit"=\>"Create", "action"=\>"create", "controller"=\>"person", "person"=\>{"first\_name"=\>"Fred", "last\_name"=\>"Flintstone", "email"=\>"fred@bedrock.com"}}

ArgumentError (wrong number of arguments (1 for 0)): &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/scaffolding.rb:128:in `initialize' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/scaffolding.rb:128:in `new' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/scaffolding.rb:128:in `create' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/base.rb:1095:in `perform_action_without_filters' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call\_filter' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:638:in `call_filter' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:438:in `call' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:637:in `call_filter' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform\_action\_without\_benchmark' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/benchmarking.rb:66:in `perform_action_without_rescue' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/benchmark.rb:293:in `measure' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/benchmarking.rb:66:in `perform_action_without_rescue' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform\_action' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/base.rb:430:in `send' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process\_without\_filters' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/filters.rb:624:in `process_without_session_management_support' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/base.rb:330:in `process' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick\_server.rb:113:in `handle_dispatch' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in `service' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:95:in `start' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `each' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:92:in `start' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:23:in `start' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/1.8/webrick/server.rb:82:in `start' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick\_server.rb:63:in `dispatch' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick.rb:59 &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `require' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:342:in `new_constants_in' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `gem_original_require' &nbsp;&nbsp;&nbsp;&nbsp;/usr/local/ruby-1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' &nbsp;&nbsp;&nbsp;&nbsp;script/server:3

Rendering /usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/templates/rescues/layout.rhtml (500 Internal Error)

/\* and apologies for the unintended pasted content in the subject! \*/

---

<div class="post-metadata">

**Author:** ![Adam\_Cohen](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Adam\_Cohen](https://discuss.rubyonrails.org/u/Adam_Cohen)\
**Post date:** [July 20, 2007, 7:42pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/3 "2007-07-20T19:42:18Z")

</div>

what's the code in your create action?

Adam

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 20, 2007, 7:56pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/4 "2007-07-20T19:56:19Z")

</div>

Perhaps I'm confused by the tutorial I'm reading, but I thought this was a built-in function delivered by 'scaffold'.

/person/list works fine if I've manually entered person data in to the DB, as does /person/destroy, but the default create action fails.

---

<div class="post-metadata">

**Author:** ![Adam\_Cohen](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Adam\_Cohen](https://discuss.rubyonrails.org/u/Adam_Cohen)\
**Post date:** [July 20, 2007, 8:10pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/5 "2007-07-20T20:10:43Z")

</div>

yeah the default scaffolding actions should work. I was trying to figure out if you added any custom methods to your create method.. Since it looks like somewhere along the line, a method is being called with a parameter, where it shouldn't have one. What's the address of the tutorial you're following?

Adam

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 20, 2007, 10:35pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/6 "2007-07-20T22:35:44Z")

</div>

\<[Radar – O’Reilly](http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3&gt);

Note: I'm not following it exactly, more mapping it to my own little trial app 🙂

But the default `/person/new` page appears as it should, it's just the operation fails on submit.

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 21, 2007, 5:16pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/7 "2007-07-21T17:16:04Z")

</div>

A little more info, and I'm more puzzled than ever 🙂

Going back to step one in the tutorial , I realized I'd totally skipped the 'gem install mysql' instruction. Unfortunately, that fails miserably, but that's for a separate post.

However, the USD64K question is: how can my rudimentary app read and update the DB without the driver, and then fail on trying to create a new entry?

???

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [July 22, 2007, 3:03pm UTC](https://discuss.rubyonrails.org/t/processing-personcontroller-create-for-192-168-1-50-at-2007-07-20-1055-post-argumenterror-in-personcontroller-create-wrong-number-of-arguments-1-for-0/15924/8 "2007-07-22T15:03:27Z")

</div>

> Well, that 'gem intall mysql' doesn't install a driver, rather native bindings for ruby. It's totally an optional step

Thanks for clarifying that! So I can ignore that issue for now.

> That ArgumentError is strange. I tried to do a few noobish things myself and couldn't replicate it. Have you written some of your own actions in the PersonController?

I had, but removing them didn't change anything.

> Also, I assume that you're doing the scaffolding by including the line 'scaffold :person' in the controller. Have you tried scaffolding the other way? Try running the command 'script/generate scaffold yourController yourModel'.

I tried this on a fresh new Rails instance and noticed that the controller created for Person was 'people\_controller', /not/ 'person\_controller'. Maybe some conflict there? In any case, it works fine now using the second scaffold method, so let me wade back in and see what else I can break 🙂

At least I discovered Logger through this, but I'd be interested in any pointers to general RoR troubleshooting tips/tricks/best practice.

Regardless, thanks for the help!
