# Mongrel Socket read error on .pages (iWork) file

**URL:** <https://www.ruby-forum.com/t/mongrel-socket-read-error-on-pages-iwork-file/159808>\
**Category:** Rails\
**Created:** [February 9, 2009, 2:35am UTC](https://www.ruby-forum.com/t/mongrel-socket-read-error-on-pages-iwork-file/159808 "2009-02-09T02:35:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremy\_Olliver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/22d042/32.png) [@Jeremy\_Olliver](https://www.ruby-forum.com/u/Jeremy_Olliver)\
**Post date:** [February 9, 2009, 2:35am UTC](https://www.ruby-forum.com/t/mongrel-socket-read-error-on-pages-iwork-file/159808/1 "2009-02-09T02:35:07Z")

</div>

Hi,

I’m having a quite peculiar problem that hopefully someone can help me  
with.

I use attachment\_fu for image uploads, and found that uploads with  
any .pages files don’t work. The error I’m getting for my development  
server is:

Mon Feb 09 14:20:26 +1300 2009: Error reading HTTP body:  
#\<RuntimeError: Socket read return nil\>  
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/  
http\_request.rb:105:in `read\_socket’

(There’s more stack trace, but it seems to stem from there)

So the error is when mongrel tries to read the file, before it even  
hits my application code. I’ve also tried running my development  
server using thin, but again an error was thrown before even hitting  
my application code (I assume that both are built on socket or  
whatever is actually causing this error).

Has anyone else run into this, or does anyone know enough about the  
code in the socket that’s being used here to help out?

I’m running  
ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-darwin8.10.2]  
and Rails 2.1.0

---

<div class="post-metadata">

**Author:** ![Jeremy\_Olliver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/22d042/32.png) [@Jeremy\_Olliver](https://www.ruby-forum.com/u/Jeremy_Olliver)\
**Post date:** [February 9, 2009, 2:42am UTC](https://www.ruby-forum.com/t/mongrel-socket-read-error-on-pages-iwork-file/159808/2 "2009-02-09T02:42:08Z")

</div>

Jeremy -

On 8-Feb-09, at 8:34 PM, Jeremy Olliver wrote:

> Mon Feb 09 14:20:26 +1300 2009: Error reading HTTP body:  
> #\<RuntimeError: Socket read return nil\>  
> /opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/  
> http\_request.rb:105:in `read\_socket’
> 
> (There’s more stack trace, but it seems to stem from there)

I don’t have the answer, but maybe a hint. (not being coy, but hoping  
this bit will help)

pages files are folders - you can right click and “show package  
contents”.

I use redmine (issues management), and I cannot upload pages file to it.

So the format might be strange enough that it cannot be uploaded -  
that the browser is confused.

Jodi

---

<div class="post-metadata">

**Author:** ![Jeremy\_Olliver](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/22d042/32.png) [@Jeremy\_Olliver](https://www.ruby-forum.com/u/Jeremy_Olliver)\
**Post date:** [February 9, 2009, 2:54am UTC](https://www.ruby-forum.com/t/mongrel-socket-read-error-on-pages-iwork-file/159808/3 "2009-02-09T02:54:24Z")

</div>

That’s a good point, and I agree is probably the reason why.  
BTW if you do need to upload pages files, you can zip them first  
(makes them a single file I guess) then upload them successfully

Thanks,  
Jeremy
