Ticker

6/recent/ticker-posts

Ruby EOFError: end of file reached

EOFError: end of file reached
from /usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread'
from /usr/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill'
from /usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /usr/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'

The key point to resolve this kinda issue is to encode the url, before fire the connect or get.

@agent.get URI.encode(url)

 

Post a Comment

1 Comments

  1. Hi, can you explain more about what this means or what the reason for this is? I'm just WEBrick and doing some port forwarding for SproutCore development work, but it doesn't seem to work consistently for me

    About 75% of the time, I can a 500 server error when doing GETs to URLs like http://localhost:4020/paper/49248592?cv=1&lang=en_us&output=json.

    ReplyDelete