Forum: Ruby on Rails send_file doesn't work with Apache?...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Stuart Hungerford (Guest)
on 2005-12-13 06:27
(Received via mailing list)
Hi,

I've been using send_file in my Rails application with
WEBrick happily to send files of various sizes and
kinds.

The same code fails to send anything but a 500 error
when run under Apache, and a log file message
"warning: syswrite for buffered IO".

Looking back through the mailing list archives I see that
there have been send_file bugs in the past.  Can some
knowledgeable person tell me if these problems are
still unfixed for Rails application using Apache?

Cheers,

Stu
Nicholas H. (Guest)
on 2006-02-17 20:58
(Received via mailing list)
Stuart,

Did you get this resolved at all? It looks like I'm hitting the same
issue.

Cheers,
Nicholas
Daniel (Guest)
on 2006-04-05 15:27
Stuart Hungerford wrote:
> Hi,
>
> I've been using send_file in my Rails application with
> WEBrick happily to send files of various sizes and
> kinds.
> The same code fails to send anything but a 500 error
> when run under Apache, and a log file message
> "warning: syswrite for buffered IO".

Has anybody discovered a solution for this exact bug?
I really need the send_file

Best regards,
Daniel
Daniel (Guest)
on 2006-04-05 16:19
http://blog.teksol.info/articles/2005/12/26/send-f...

Add the
:stream => false
parameter and it will work.

=)

Daniel
This topic is locked and can not be replied to.