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.
Df31a543d684be5fd6bc6c188d378615?d=identicon&s=25 Stuart Hungerford (Guest)
on 2005-12-13 05: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
833fbd3f58a8ebbeb43756e8634334ed?d=identicon&s=25 Nicholas Henry (Guest)
on 2006-02-17 19:58
(Received via mailing list)
Stuart,

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

Cheers,
Nicholas
6738e5c4f17822f7e163ba938344755d?d=identicon&s=25 Daniel (Guest)
on 2006-04-05 13: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
6738e5c4f17822f7e163ba938344755d?d=identicon&s=25 Daniel (Guest)
on 2006-04-05 14: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.