2008/02/08

scrubyt on rails EOFERROR

I'm using scrubyt on rails2.0.2 and development / running evironment is cygwin. 
Problem :
Everytime I run my extractor which is located lib and included in controller, 
it runs properly just once. From second time, I saw EOFError and 
I've searched scrubyt forum. and included this file in lib. 

----------------------------
usr/lib/ruby/1.8/net/protocol.rb:133:in `sysread'
/usr/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
/usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
/usr/lib/ruby/gems/1.8/gems/http_configuration-1.0.2/lib/http_configuration.rb:23:in `timeout'
----------------------------

Why :
I've googled about this problem enough. The problem is not on rails, nor on ruby. It's mechanize. 
Here is the explanation about the bug.


Solve :
C:\cygwin\lib\ruby\gems\1.8\gems\scrubyt-0.3.4\lib\scrubyt\core\navigation\fetch_action.rb
I've added just one line to the fetch_action.rb

module FetchAction  
@@current_doc_url = nil  
@@current_doc_protocol = nil  
@@base_dir = nil  
@@host_name = nil  
@@agent = WWW::Mechanize.new  
@@history = []  
@@agent.keep_alive = false

2 comments:

  1. Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Wireless, I hope you enjoy. The address is http://wireless-brasil.blogspot.com. A hug.

    ReplyDelete
  2. Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Telefone VoIP, I hope you enjoy. The address is http://telefone-voip.blogspot.com. A hug.

    ReplyDelete