Or perhaps I am stumbling in newbie fashion (tho I have active_merchant
and a store site basically up and running in development mode - still I
don’t feel I always understand what is going on.)
So, when I have
send_file(filename, :type => ‘application/x-zip’)
redirect :action => index
the send_file seems to hang, rather than complete. I’m deducing this
because of errors that happen after the send_file. When I try to
navigate from the page containing ‘send_file’ to another page, I get an
error with a trace indicating that it has not been able to complete the
redirect.
If the send_file is followed by a ‘redirect :action => index’
the redirect is never executed.
If I comment out the send_file, the redirect is always executed.
What is the problem here? I’m stumped.
thanks much!
Here is the relevant portion of the trace, see the download/redirect
stuff:
er.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in
start_thread’
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in
start’
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/webrick_server.rb:67:in
dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
require' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/server.rb:30 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require’
script/server:3
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:840:in
`redirect_to'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:854:in
`redirect_to'
app/controllers/products_controller.rb:167:in `download_vbj_product'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:941:in
`perform_action_without_filters'