Skip to content

I made some small changes so that it now works with Ruby 1.9 #8

wants to merge 1 commit into from

2 participants

urubatan commented Jun 3, 2011

It is now working with ruby 1.9

tugge commented Jul 26, 2011

Nice work to adjust to Ruby 1.9.

I followed the changes and I run scrubyt with Ruby 1.9.2 on windows and get the following error when calling Scrubyt::Extractor.define do

C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:479:in load_missing_constant': Scrubyt::Navigation is not missing constant Mechanize! (ArgumentError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:in
block in const_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/navigation/agents/mechanize.rb:17:in block in included'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/navigation/agents/mechanize.rb:16:in
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/navigation/agents/mechanize.rb:16:in included'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:29:in
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:29:in block in define'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:28:in
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:28:in `define'

It seems to be related to "@@agent =" in scrubyt/core/navigation/agents/mechanize.rb that Mechanize is not loaded despite that in the file "require 'mechanize'" is specified

I installed mechanize (2.0.1), hpricot (0.8.4), fireawtir (1.9.3) and nokogiri (1.5.0)

Any ideas about why the issue?

tugge commented Jul 31, 2011

Solved now by using mechanize (0.9.3) and changed scrubyt-0.4.31\lib\scrubyt\core\navigation\agents\mechanize.rb, @@agent = to @@agent = Might just be a problem at my own, but post the solution here in case anyone else can use it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.