Hey Guys,
I''m trying to upload a file to rails. I thought it would be pretty
straightforward but I''ve run into a peculiar bug... the form
I''m using
is shown below and then the error message.... any suggestions or
diagnostic hints would be appreciated. I''m running rails 2.0.2 and
ruby
1.8.6
<form method="post" enctype="multipart/form-data"
action="/page_assets">
<p>
<label for="mugshot">Upload A Mugshot:</label>
<input type="file" size="30"
name="mugshot[uploaded_data]"
id="mugshot_uploaded_data"/>
</p>
<p>
<input type="submit" value="Create"
name="commit"/>
</p>
</form>
</body></html>
===========================================================Completed in 0.34441
(2 reqs/sec) | Rendering: 0.04722 (13%) | DB:
0.00775 (2%) | 200 OK [http://localhost/searchs/new]
/!\ FAILSAFE /!\ Fri Apr 04 22:12:24 -0700 2008
Status: 500 Internal Server Error
wrong number of arguments (3 for 2)
/usr/lib/ruby/1.8/tempfile.rb:55:in `open''
/usr/lib/ruby/1.8/tempfile.rb:55:in `initialize''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:521:in
`new''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:521:in
`read_multipart''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:517:in
`loop''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:517:in
`read_multipart''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:445:in
`parse_multipart_form_parameters''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:383:in
`parse_formatted_request_parameters''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:78:in
`request_parameters''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:287:in
`parameters''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:22:in
`request_method''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb:35:in
`method''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/routing.rb:1483:in
`extract_request_environment''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/routing.rb:1424:in
`recognize''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:170:in
`handle_request''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in
`dispatch''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in
`dispatch_cgi''
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in
`dispatch''
/usr/lib/ruby/1.8/mongrel/rails.rb:78:in `process''
/usr/lib/ruby/1.8/mongrel/rails.rb:76:in `synchronize''
/usr/lib/ruby/1.8/mongrel/rails.rb:76:in `process''
/usr/lib/ruby/1.8/mongrel.rb:618:in `process_client''
/usr/lib/ruby/1.8/mongrel.rb:617:in `each''
/usr/lib/ruby/1.8/mongrel.rb:617:in `process_client''
/usr/lib/ruby/1.8/mongrel.rb:736:in `run''
/usr/lib/ruby/1.8/mongrel.rb:736:in `initialize''
/usr/lib/ruby/1.8/mongrel.rb:736:in `new''
/usr/lib/ruby/1.8/mongrel.rb:736:in `run''
/usr/lib/ruby/1.8/mongrel.rb:720:in `initialize''
/usr/lib/ruby/1.8/mongrel.rb:720:in `new''
/usr/lib/ruby/1.8/mongrel.rb:720:in `run''
/usr/lib/ruby/1.8/mongrel/configurator.rb:271:in `run''
/usr/lib/ruby/1.8/mongrel/configurator.rb:270:in `each''
/usr/lib/ruby/1.8/mongrel/configurator.rb:270:in `run''
/usr/lib/ruby/1.8/mongrel_rails:128:in `run''
/usr/lib/ruby/1.8/mongrel/command.rb:211:in `run''
/usr/lib/ruby/1.8/mongrel_rails:244
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in
`load''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in
`load''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants_in''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in
`load''
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants_in''
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require''
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
script/server:3
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---