tags:

views:

167

answers:

0
ruby mech.rb

/usr/lib/ruby/gems/1.8/gems/mechanize-0.9.3/lib/www/mechanize/chain/uri_resolver.rb:53:in handle': need absolute URL (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/mechanize-0.9.3/lib/www/mechanize/chain.rb:25:in handle' from /usr/lib/ruby/gems/1.8/gems/mechanize-0.9.3/lib/www/mechanize.rb:457:in fetch_page' from /usr/lib/ruby/gems/1.8/gems/mechanize-0.9.3/lib/www/mechanize.rb:238:in get' from mech.rb:5

require 'rubygems'
require 'mechanize'

agent = WWW::Mechanize.new
page = agent.get('http//google.com/')

In console I write ruby mech.rb and getting error. Please help me to solve this problem. Google doesn't help! I can;t understand what's the problem...