#14 open
Shawno

Latest mechanize (0.9.0) breaks ScrubyT(0.4.1)

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

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 -

Comments and changes to this ticket

  • Shawno

    Shawno January 25th, 2009 @ 02:16 AM

    Updating -

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

  • Peter Szinek

    Peter Szinek January 31st, 2009 @ 01:43 AM

    • 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

  • wtoman

    wtoman February 6th, 2009 @ 01:26 PM

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

  • Rathgar

    Rathgar February 27th, 2009 @ 12:31 PM

    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)
    
  • orisun

    orisun May 30th, 2009 @ 11:35 AM

    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

  • orisun

    orisun May 30th, 2009 @ 11:58 AM

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

  • orisun

    orisun May 30th, 2009 @ 12:03 PM

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

    good work... nice tool..
    thx

  • Yura

    Yura September 11th, 2009 @ 11:49 PM

    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

  • relix

    relix January 14th, 2010 @ 11:51 PM

    • 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...

  • bobbus1111

    bobbus1111 April 18th, 2010 @ 07:19 AM

    +1 Nothing to do to fix this issue ??

  • Prads

    Prads November 24th, 2010 @ 12:42 PM

    • 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!

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A simple to learn and use, yet powerful web scraping toolkit written in Ruby.

Attachments

Tags

Pages