everypolitician / scraped_page_archive

Create an archive of HTML pages scraped by a Ruby scraper
MIT License
1 stars 0 forks source link

Error when using Capybara support #30

Closed chrismytton closed 8 years ago

chrismytton commented 8 years ago

I added scraped_page_archive's Capybara support to the Uganda Parliament scraper in https://github.com/everypolitician-scrapers/uganda-parliament-scraper/pull/3. However when I try to run the scraper I get the following error:

$ bundle exec ruby scraper.rb
/Users/chris/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/scraped_page_archive-0.4.1/lib/scraped_page_archive/capybara.rb:58:in `command': undefined local variable or method `page' for #<Capybara::Poltergeist::Browser:0x007fafc0e12158> (NameError)
        from /Users/chris/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/poltergeist-1.6.0/lib/capybara/poltergeist/browser.rb:31:in `visit'
        from /Users/chris/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/poltergeist-1.6.0/lib/capybara/poltergeist/driver.rb:95:in `visit'
        from /Users/chris/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/capybara-2.5.0/lib/capybara/session.rb:232:in `visit'
        from scraper.rb:31:in `block in scrape_list'
        from scraper.rb:30:in `map'
        from scraper.rb:30:in `scrape_list'
        from scraper.rb:13:in `scrape'
        from scraper.rb:113:in `<main>'