Hi. Im new to ruby but think I have grasped the basics.
Right now Im trying to do some screen scraping using the Mechanize gem.
My problem is that my development environment (JetBrains RubyMine
4.5.4/Ruby 1.9.4/Mechanize 2.5.1) doesnt seem to find the mechanize
I try to execute this code:
agent = Mechanize.new
page = agent.get(‘http://www.google.com/’)
news = page.link_with(:text => ‘News’).click
And I get this message:
<top (required)>': undefined methodclick’ for nil:NilClass
load' from -e:1:in’
What could be the problem?