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

2008/02/07

My gem list

I'm developing rails app on cygwin environment. And these are the list of my gems.  mongrel and thin are really run differently. It seems monrel consumes more memory. So I poked thin server. The result was slightly dissapoint, because thin server was not stable and was not capable of handling large size file uploading.  Anyway it's a dilema.
update -- thin0.6.2 is ok with my app now. It's really fast and stable.
  • abstract (1.0.0)
  • actionmailer (2.0.2)
  • actionpack (2.0.2)
  • activerecord (2.0.2)
  • activeresource (2.0.2)
  • activesupport (2.0.2)
  • acts_as_ferret (0.4.3)
  • archive-tar-minitar (0.5.1)
  • archive-tarsimple (1.1.1)
  • aws-s3 (0.4.0)
  • beanstalk-client (0.6.1)
  • builder (2.1.2)
  • capistrano (2.1.0)
  • capserverext (0.0.5)
  • cgi_multipart_eof_fix (2.5.0)
  • coderay (0.7.4.215)
  • color (1.4.0)
  • daemons (1.0.9)
  • deprec (1.9.2)
  • erubis (2.5.0)
  • eventmachine (0.10.0)
  • fastercsv (1.2.3)
  • fastthread (1.0.1)
  • ferret (0.11.6)
  • flickraw (0.4.4)
  • flvtool2 (1.0.6)
  • gchart (0.4.2, 0.4.1)
  • gem_plugin (0.2.3)
  • gemsonrails (0.7.1)
  • geoip_city (0.1.2)
  • gettext (1.10.0)
  • googletranslate (0.2)
  • highline (1.4.0)
  • hobo (0.7.2)
  • hoe (1.5.0, 1.4.0)
  • hpricot (0.6)
  • json_pure (1.1.2)
  • mailfactory (1.2.3)
  • mechanize (0.7.0)
  • merb (0.5.3)
  • mime-types (1.15)
  • mini_magick (1.2.3)
  • mocha (0.5.6)
  • mongrel (1.1.3)
  • mongrel_cluster (1.0.5)
  • mongrel_send_file (0.1)
  • needle (1.3.0)
  • net-sftp (1.1.0)
  • net-ssh (1.1.2)
  • oauth (0.2.0)
  • ParseTree (2.1.1, 1.7.1)
  • ParseTreeReloaded (0.0.1)
  • pdf-writer (1.1.7)
  • piston (1.3.3)
  • rack (0.2.0)
  • radiant (0.6.4)
  • rails (2.0.2)
  • railsmachine (1.0.0)
  • rake (0.8.1)
  • RedCloth (3.0.4)
  • reliable-msg (1.1.0)
  • rfacebook (0.9.8)
  • right_aws (1.4.3)
  • right_http_connection (1.2.0)
  • rme2day (1.0.2)
  • rubigen (1.1.1)
  • ruby-debug (0.10.0)
  • ruby-debug-base (0.10.0)
  • ruby-hmac (0.3.1)
  • ruby-openid (2.0.3)
  • ruby-prof (0.5.2)
  • ruby-yadis (0.3.4)
  • ruby2ruby (1.1.8, 1.1.6)
  • rubyforge (0.4.4)
  • rubygems-update (1.0.1)
  • RubyInline (3.6.3)
  • RubyInlineAcceleration (0.0.1)
  • rubyzip (0.9.1)
  • ruport (1.4.0)
  • ruport-util (0.12.0)
  • rvideo (0.9.3)
  • scrapi (1.2.0)
  • scrubyt (0.3.4)
  • simple-daemon (0.1.2)
  • slave (1.2.1)
  • sources (0.0.1)
  • springnote_resources (0.5)
  • sqlite3-ruby (1.2.1)
  • superredcloth (1.160)
  • syntax (1.0.0)
  • termios (0.9.4)
  • thin (0.6.1)
  • tidy (1.1.2)
  • transaction-simple (1.4.0)
  • tzinfo (0.3.6)
  • uuid (1.0.4)
  • xml-simple (1.0.11)

2008/02/01

backgroudrb small tip.


gerate worker thread (Boo is capitalized) 
$ script/generate worker Boo

http://jacqueschirag.wordpress.com/2007/09/12/setting-up-backgrounddrb/