# Send\_file doesn't work with Apache?

**URL:** <https://www.ruby-forum.com/t/send-file-doesnt-work-with-apache/50114>\
**Category:** Rails\
**Created:** [December 13, 2005, 5:27am UTC](https://www.ruby-forum.com/t/send-file-doesnt-work-with-apache/50114 "2005-12-13T05:27:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stuart\_Hungerford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@Stuart\_Hungerford](https://www.ruby-forum.com/u/Stuart_Hungerford)\
**Post date:** [December 13, 2005, 5:27am UTC](https://www.ruby-forum.com/t/send-file-doesnt-work-with-apache/50114/1 "2005-12-13T05:27:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stuart\_Hungerford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@Stuart\_Hungerford](https://www.ruby-forum.com/u/Stuart_Hungerford)\
**Post date:** [April 5, 2006, 1:27pm UTC](https://www.ruby-forum.com/t/send-file-doesnt-work-with-apache/50114/2 "2006-04-05T13:27:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stuart\_Hungerford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@Stuart\_Hungerford](https://www.ruby-forum.com/u/Stuart_Hungerford)\
**Post date:** [April 5, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/send-file-doesnt-work-with-apache/50114/3 "2006-04-05T14:19:59Z")

</div>

[http://blog.teksol.info/articles/2005/12/26/send-file-breakage-using-scgi-apache](http://blog.teksol.info/articles/2005/12/26/send-file-breakage-using-scgi-apache)

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

=)

Daniel

---

<div class="post-metadata">

**Author:** ![Stuart\_Hungerford](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b38774/32.png) [@Stuart\_Hungerford](https://www.ruby-forum.com/u/Stuart_Hungerford)\
**Post date:** [February 17, 2006, 7:58pm UTC](https://www.ruby-forum.com/t/send-file-doesnt-work-with-apache/50114/4 "2006-02-17T19:58:55Z")

</div>

Stuart,

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

Cheers,  
Nicholas
