I am trying to write a web scraper using Watir that can be run on a schedule.
My module is called PriceScraperModule
but it is not loading. I get this error:
NameError (uninitialized constant PriceScraperModule::Watir)
My module looks like:
module PriceScraperModule
def self.scrape
browser = Watir::Browser.new
end
end
My Gemfile includes:
gem 'watir'
gem 'webdrivers'
When I try requiring it, it doesn't work either:
module PriceScraperModule
require 'watir'
def self.scrape
browser = Watir::Browser.new
end
end
I get this error:
LoadError (cannot load such file -- watir)
What should I do?