Problems getting Mechanize working...

S

Sergio Ruiz

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>
 
J

Jano Svitok

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>

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?
 
S

Sergio Ruiz

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!
 
J

Jano Svitok

yes, i did do that..


let me try this..


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=... >).
 
S

Sergio Ruiz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top