# Scrubyt anyone?

**URL:** <https://www.ruby-forum.com/t/scrubyt-anyone/175642>\
**Category:** Ruby\
**Created:** [September 16, 2009, 11:09pm UTC](https://www.ruby-forum.com/t/scrubyt-anyone/175642 "2009-09-16T23:09:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Audrey\_A\_Lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Audrey\_A\_Lee](https://www.ruby-forum.com/u/Audrey_A_Lee)\
**Post date:** [September 16, 2009, 11:09pm UTC](https://www.ruby-forum.com/t/scrubyt-anyone/175642/1 "2009-09-16T23:09:10Z")

</div>

Hi,

Are any of you using scrubyt?

Scrubyt has a forum but it seems near death.

But, this mail-list has a good group of very sharp and knowledgeable  
rubyists.

I have installed the scrubyt demos:

- git clone git://github.com/scrubber/scrubyt\_examples.git

I tried this one:

$ ruby ruby\_quiz\_189.rb  
/pt/r1/lib/ruby/gems/1.8/gems/scrubyt-0.4.1/lib/scrubyt/core/scraping/  
filters/download\_filter.rb:19:in  
`download_file': undefined method`include?’ for nil:NilClass  
(NoMethodError)  
from /pt/r1/lib/ruby/gems/1.8/gems/scrubyt-0.4.1/lib/scrubyt/  
core/scraping/filters/download\_filter.rb:8:in  
`evaluate' from /pt/r1/lib/ruby/gems/1.8/gems/scrubyt-0.4.1/lib/scrubyt/ core/scraping/pattern.rb:250:in`evaluate’

I’d welcome any hints on how to debug ruby\_quiz\_189.rb so it will run.

scrubyt depends on some other gems:

hpricot  
mechanize

Here is what I have:

$ gem list hpricot

\*\*\* LOCAL GEMS \*\*\*

hpricot (0.6.164)

$ gem list mechanize

\*\*\* LOCAL GEMS \*\*\*

mechanize (0.9.3)

Thanks!

---

<div class="post-metadata">

**Author:** ![Audrey\_A\_Lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Audrey\_A\_Lee](https://www.ruby-forum.com/u/Audrey_A_Lee)\
**Post date:** [September 17, 2009, 9:50am UTC](https://www.ruby-forum.com/t/scrubyt-anyone/175642/2 "2009-09-17T09:50:42Z")

</div>

Hi,

which ruby version are you using?  
I had (and have) massive problems using 1.9  
and scrubyt. I submitted a series of small fixes  
to scrubyt on the Google G. list, but they  
don’t seem to be in the latest github version.  
After those fixes it seems mechanize/nokogiri  
does not play well with 1.9 and scrubyt.

Good luck.

Audrey A Lee schrieb:

---

<div class="post-metadata">

**Author:** ![Audrey\_A\_Lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Audrey\_A\_Lee](https://www.ruby-forum.com/u/Audrey_A_Lee)\
**Post date:** [September 17, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/scrubyt-anyone/175642/3 "2009-09-17T14:41:03Z")

</div>

Could you be more specific about what problems you are seeing with  
Mechanize/Nokogiri? Both libraries successfully pass their test suites  
on  
1.9.

I’m unable to make scrubyt’s 6 tests pass on any version of Ruby.

---

<div class="post-metadata">

**Author:** ![Audrey\_A\_Lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Audrey\_A\_Lee](https://www.ruby-forum.com/u/Audrey_A_Lee)\
**Post date:** [September 17, 2009, 11:58pm UTC](https://www.ruby-forum.com/t/scrubyt-anyone/175642/4 "2009-09-17T23:58:23Z")

</div>

On Sep 17, 2009, at 05:39 , Mike D. wrote:

> Could you be more specific about what problems you are seeing with  
> Mechanize/Nokogiri? Both libraries successfully pass their test  
> suites on  
> 1.9.
> 
> I’m unable to make scrubyt’s 6 tests pass on any version of Ruby.

HAHAHA! You noticed that too!?!?

OMG I love you.

---

<div class="post-metadata">

**Author:** ![Audrey\_A\_Lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f475e1/32.png) [@Audrey\_A\_Lee](https://www.ruby-forum.com/u/Audrey_A_Lee)\
**Post date:** [September 17, 2009, 11:50pm UTC](https://www.ruby-forum.com/t/scrubyt-anyone/175642/5 "2009-09-17T23:50:12Z")

</div>

Ok, so this seems to be a problem of scrubyt, then. I only  
tried ruby 1.9 and could not make the test pass.  
After some fiddling with scrubyts code, the error came deep  
from inside mechanize, as far as I recall, something like  
an unexpected nil running loose.  
So I put the blame to mechanize, seems that was too fast.  
The fixes I introduced were mainly 1.9 specific things, like the  
usage of jcode and case syntax.

To quote my post to the google groups list:

1. /scrubyt/utils/simple\_example\_lookup.rb:18: syntax error,  
unexpected $end, expecting ‘)’  
text.gsub!(’»’, ‘»’)  
Solution: insert “#coding UTF-8” at the top of the file
2. /scrubyt/core/navigation/agents/firewatir.rb:52: syntax error,  
unexpected ‘:’, expecting keyword\_then or ‘,’ or ‘;’ or  
‘\n’ (SyntaxError)  
when ‘file’: @@agent.goto(“file://”+ @@cu…  
Solution: replace “:” —\> “then”

Afterwards the tests still fail with 6 errors.

Thorsten

Mike D. schrieb:
