Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Latest mechanize (0.9.0) breaks ScrubyT(0.4.1)

#14

Was trying out scrubyt for the first time and couldn't get even the simplest of the examples to run. Most were returning some kind of undefined method []=' for nil:NilClass (NoMethodError) somewhere in the script.

Noticing that the latest mechanize came out shortly after the last scrubyt, on a hunch I dropped down to mechanize 0.8.5 - and everything worked (so far).

Hope this helps anyone who's pulling thier hair out.

Keep up the good work Peter -

Reported by Shawno · January 25th, 2009 @ 12:15 AM

State: open
Milestone: none
Assigned to: nobody

Activity

  1. Shawno
    Shawno

    Updating -

    Ok, going to 0.8.5 on mechanize didn't solve the problem - can close this ticket for now -

    January 25th, 2009 @ 02:16 AM

  2. Peter Szinek
    Peter Szinek
    • Assigned user set to Peter Szinek
    • State changed from new to open

    Yeah this is because mechanize switched to nokogiri which is not entirely 100% compatible with hpricot it seems...

    didn't quite get your update though - first you said it's OK with mechanize 0.8.5, then you said it's not? ~confused~

    Anyway, this is a valid ticket, it should work with >= 0.9.0

    January 31st, 2009 @ 01:43 AM

  3. wtoman
    wtoman

    For me it's also working on mechanize 0.8.5 and breaks on 0.9 version.

    February 6th, 2009 @ 01:26 PM

  4. Rathgar
    Rathgar

    Same here.

    Installed all latest gems from fresh and fails. Un-installed latest Mechanize and installed 0.8.5 and works fine. No other gems altered.

    All related gems installed (when working):

    
    firewatir (1.6.2)                   
    hoe (1.8.3)                         
    hpricot (0.6.164)                   
    mechanize (0.8.5)                   
    nokogiri (1.2.1)
    rails (2.3.0, 2.2.2, 2.1.0)
    rubyforge (1.0.2)
    scrubyt (0.4.06)
    xml-simple (1.0.11)
    

    February 27th, 2009 @ 12:31 PM

  5. orisun
    orisun

    Hi,
    I tried the example:
    google_data = Scrubyt::Extractor.define do
    fetch 'http://www.google.com/ncr' fill_textfield 'q', 'ruby' submit
    result 'Ruby Programming Language' end
    google_data.to_xml.write($stdout, 1)
    Scrubyt::ResultDumper.print_statistics(google_data)

    And I still get the error:

    undefined method write' for #<String:0xb7551a88> (NoMethodError)

    My gems:
    firewatir (1.6.2)
    hpricot (0.6)
    mechanize (0.8.5)
    scrubber-scrubyt (0.4.30)

    I tried different versions of the gems, but nothing helps.

    orisun

    May 30th, 2009 @ 11:35 AM

  6. orisun
    orisun

    additional..
    Excuse me for the unformatted code (I copied it from gedit) and
    Thanks for the helpful tool...

    May 30th, 2009 @ 11:58 AM

  7. orisun
    orisun

    It works..
    scrubyt (0.4.06) let it work...

    good work... nice tool..
    thx

    May 30th, 2009 @ 12:03 PM

  8. Yura
    Yura

    Sorry for continuing this, but I'm not able to run the following example:

    require 'rubygems'
    require 'scrubyt'
    
    ebay_data = Scrubyt::Extractor.define do
    
      fetch 'http://www.ebay.com/'
      fill_textfield 'satitle', 'ipod'
      submit
      click_link 'Apple iPod'
    
      record do
        item_name 'APPLE NEW IPOD MINI 6GB MP3 PLAYER SILVER'
        price '$71.99'
      end
      next_page 'Next >', :limit => 5
    end
    

    Gems installed:

    
    builder (2.1.2)
    commonwatir (1.6.2)
    firewatir (1.6.2)
    hoe (2.3.3)
    hpricot (0.6.164)
    log4r (1.0.5)
    mechanize (0.6.3)
    nokogiri (1.3.3)
    rubyforge (1.0.4)
    rubygems-update (1.3.5)
    s4t-utils (1.0.4)
    scrubyt (0.4.06)
    user-choices (1.1.6)
    xml-simple (1.0.12)
    

    I've tried downgrading of mechanize gem till 0.8.5, 0.7.0 and finally 0.6.3 versions but there is still an error

    September 11th, 2009 @ 11:49 PM

  9. relix
    relix
    • Assigned user cleared.

    I too am still getting errors. I've tried downgrading all gems to the versions mentioned by Rathgar but it just won't work. Really sloppy...

    January 14th, 2010 @ 11:51 PM

  10. bobbus1111
    bobbus1111

    +1 Nothing to do to fix this issue ??

    April 18th, 2010 @ 07:19 AM

  11. Prads
    Prads
    • Tag set to fail
    • Milestone order changed from 0 to 0

    Its surprising that this ticket is almost 2 years old and the problem still persists. I tried using Scrubyt with various dependent gems as well as Ruby versions.. still no luck. I'm a Ruby noob and can't fix all the errors. Since this is such an old ticket, I'm curious to know what all the previous post authors did? Is there an alternate solution that you found that just does what Scrubyt is supposed to be doing? Any help or guidance will be much appreciated. Thanks!

    November 24th, 2010 @ 12:42 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.