Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Ruby 1.9.0 and Mechanize
Kyle Hunter
2/23/2008 12:16:00 AM
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/...
)", @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...
)
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 `<main>'
irb(main):005:0>
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Ruby 1.9.0 and Mechanize
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password