У меня есть код ниже в моем контроллере
<% form_for @picture, :picture, :url=>pictures_url, :html => { :multipart => true } do | form | %>
<%=form.file_field :image%>
<%=submit_tag 'Save'%>
<%end%>
, который подчиняется нижеследующему контроллеру
class PicturesController < ApplicationController
def create
render :text=>1
end
end
Когда я включаю: multipart => true, я получаю следующую ошибку, однако, если я не использую multipart, тогда все работает нормально?
/!\ FAILSAFE /!\ Tue Jun 29 09:59:47 +0100 2010
Status: 500 Internal Server Error
wrong number of arguments (1 for 0)
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:338:in `initi
ze'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:338:in `new'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:338:in `parse
ltipart'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:323:in `loop'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:323:in `parse
ltipart'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/request.rb:133:in `POS
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:15:i
call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/par
_parser.rb:15:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ses
n/cookie_store.rb:93:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/fai
fe.rb:26:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchro
e'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dis
cher.rb:114:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/rel
er.rb:34:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dis
cher.rb:108:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in
all'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:1
n `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:i
call'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:
`service'
C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
C:/Ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
C:/Ruby/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:
`run'
C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_orig
l_require'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
Любые предложения, извините, если это ошибка новичка, но я только начинаю изучать рельсы.
Спасибо
Andy