Problems getting file upload to work on rails 2.0.2

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

Upload A Mugshot:

============================================================
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:ininitialize’
/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:inread_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:inread_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:inparse_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:inparameters’
/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:inmethod’
/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:inrecognize’
/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:indispatch’
/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:indispatch’
/usr/lib/ruby/1.8/mongrel/rails.rb:78:in process' /usr/lib/ruby/1.8/mongrel/rails.rb:76:insynchronize’
/usr/lib/ruby/1.8/mongrel/rails.rb:76:in process' /usr/lib/ruby/1.8/mongrel.rb:618:inprocess_client’
/usr/lib/ruby/1.8/mongrel.rb:617:in each' /usr/lib/ruby/1.8/mongrel.rb:617:inprocess_client’
/usr/lib/ruby/1.8/mongrel.rb:736:in run' /usr/lib/ruby/1.8/mongrel.rb:736:ininitialize’
/usr/lib/ruby/1.8/mongrel.rb:736:in new' /usr/lib/ruby/1.8/mongrel.rb:736:inrun’
/usr/lib/ruby/1.8/mongrel.rb:720:in initialize' /usr/lib/ruby/1.8/mongrel.rb:720:innew’
/usr/lib/ruby/1.8/mongrel.rb:720:in run' /usr/lib/ruby/1.8/mongrel/configurator.rb:271:inrun’
/usr/lib/ruby/1.8/mongrel/configurator.rb:270:in each' /usr/lib/ruby/1.8/mongrel/configurator.rb:270:inrun’
/usr/lib/ruby/1.8/mongrel_rails:128:in run' /usr/lib/ruby/1.8/mongrel/command.rb:211:inrun’
/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:inload’
/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:inload’
/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:inrequire’
/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:innew_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:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3

Ignore this post… late night.

Sonny.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs