Problems getting Mechanize working

i am trying to get mechanize to work, but i am getting the following
error…

does anyone have any ideas?

this happens in irb and while running scripts… if i do an
agent.methods, i get not ‘get’ in the list either…

very weird…

i would appreciate any help

thanks!

irb(main):009:0> agent = WWW::Mechanize.new
=> #WWW::Mechanize:0x21960ac
irb(main):010:0> agent.get(‘http://google.com/’)
NoMethodError: undefined method `get’ for #WWW::Mechanize:0x21960ac
from (irb):10
irb(main):011:0>

On 8/23/07, Sergio R. [email protected] wrote:

i would appreciate any help

thanks!

irb(main):009:0> agent = WWW::Mechanize.new
=> #WWW::Mechanize:0x21960ac
irb(main):010:0> agent.get(‘http://google.com/’)
NoMethodError: undefined method `get’ for #WWW::Mechanize:0x21960ac
from (irb):10
irb(main):011:0>

I don’t know much about mechanize, but this code worked for me. (with
additional require ‘mechanize’ before)

Try reinstalling mechanize, or run test_all.rb in mechanize’s test
directory to check your installation.

Are you requiring the top-level mechanize.rb?

I don’t know much about mechanize, but this code worked for me. (with
additional require ‘mechanize’ before)

yes, i did do that…

Try reinstalling mechanize, or run test_all.rb in mechanize’s test
directory to check your installation.

let me try this…

Are you requiring the top-level mechanize.rb?

how would i test this?

thanks!

On 8/24/07, Sergio R. [email protected] wrote:

let me try this…

Are you requiring the top-level mechanize.rb?

how would i test this?

I meant whether do you require ‘mechanize’ or ‘mechanize/something’…

There might be other causes, but my irb displays whole bunch of
members after Mechanize.new ( <WWW::Mechanize:0xer432432 @dfdsf=…
@dfsfs=… >).

I meant whether do you require ‘mechanize’ or ‘mechanize/something’…

yeah… i do this…

There might be other causes, but my irb displays whole bunch of
members after Mechanize.new ( <WWW::Mechanize:0xer432432 @dfdsf=…
@dfsfs=… >).

hmmm… mine almost seems like it’s working with a different mechanize…

trying to figure out where the code for the gems is installed…

hmm

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs