# Ruby 1.9.0 and Mechanize

**URL:** <https://www.ruby-forum.com/t/ruby-1-9-0-and-mechanize/129958>\
**Category:** Ruby\
**Created:** [February 23, 2008, 1:15am UTC](https://www.ruby-forum.com/t/ruby-1-9-0-and-mechanize/129958 "2008-02-23T01:15:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyleh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a9a28c/32.png) [@kyleh](https://www.ruby-forum.com/u/kyleh)\
**Post date:** [February 23, 2008, 1:15am UTC](https://www.ruby-forum.com/t/ruby-1-9-0-and-mechanize/129958/1 "2008-02-23T01:15:56Z")

</div>

Hi all,

I’ve just downloaded the development release of Ruby 1.9.0.  
Unfortunately, url.relative? isn’t working well for me.

Any tips or tricks to get Mechanize to work properly would be grand,  
thanks.

irb output:  
$ irb  
irb(main):001:0\> require ‘rubygems’  
=\> true  
irb(main):002:0\> require ‘mechanize’  
=\> true  
irb(main):003:0\> agent = WWW::Mechanize.new  
=\> #\<WWW::Mechanize:0x4076e220  
@cookie\_jar=#\<WWW::Mechanize::CookieJar:0x4076e20c @jar={}\>, @log=nil,  
@open\_timeout=nil, @read\_timeout=nil, @user\_agent=“WWW-Mechanize/0.7.0  
([http://rubyforge.org/projects/mechanize/](http://rubyforge.org/projects/mechanize/))”, @watch\_for\_set=nil,  
@ca\_file=nil, @verify\_callback=nil, @cert=nil, @key=nil, @pass=nil,  
@redirect\_ok=true, @history=[],  
@pluggable\_parser=#\<WWW::Mechanize::PluggableParser:0x4076e1a8  
@parsers={“text/html”=\>WWW::Mechanize::Page},  
@default=WWW::Mechanize::File\>, @user=nil, @password=nil, @digest=nil,  
@auth\_hash={}, @digest\_response=nil, @proxy\_addr=nil, @proxy\_pass=nil,  
@proxy\_port=nil, @proxy\_user=nil, @conditional\_requests=true,  
@follow\_meta\_refresh=false, @connection\_cache={}, @keep\_alive\_time=300,  
@keep\_alive=true\>  
irb(main):004:0\> page = agent.get(‘[http://google.com/](http://google.com/)’)  
RuntimeError: no history. please specify an absolute URL  
from  
/home/kylehunter/gems/gems/mechanize-0.7.0/lib/www/mechanize.rb:397:in  
`raise' from /home/kylehunter/gems/gems/mechanize-0.7.0/lib/www/mechanize.rb:397:in `to\_absolute\_uri’  
from  
/home/kylehunter/gems/gems/mechanize-0.7.0/lib/www/mechanize.rb:164:in  
`get' from (irb):4 from /home/kylehunter/ruby19/lib/ruby/1.9.0/irb.rb:150:in `block (2  
levels) in eval\_input’  
from /home/kylehunter/ruby19/lib/ruby/1.9.0/irb.rb:259:in  
`signal_status' from /home/kylehunter/ruby19/lib/ruby/1.9.0/irb.rb:147:in `block in  
eval\_input’  
from /home/kylehunter/ruby19/lib/ruby/1.9.0/irb.rb:146:in `eval_input' from /home/kylehunter/ruby19/lib/ruby/1.9.0/irb.rb:70:in `block in  
start’  
from /home/kylehunter/ruby19/lib/ruby/1.9.0/irb.rb:69:in `catch' from /home/kylehunter/ruby19/lib/ruby/1.9.0/irb.rb:69:in `start’  
from /home/kylehunter/ruby19/bin/irb:13:in `’  
irb(main):005:0\>
