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)
OR
This is a timeout error you can handle it like below.
1 | require 'net/pop3' |
No comments:
Post a Comment