Mechanize: Can't get it to work. Can I help make it work next week?

This may be just one more play where my lack of experience with Ruby is biting
me, but I have had no luck making mechanize go. I'm using version 0.2.3, and
it claims to gem install successfully, but when I try to do a simple script
that just goes:

  require 'rubygems'
  require 'mechanize'

  agent = WWW::Mechanize.new (and several versions of thingsafterthis,
          including blank, don't seem to make
          any difference)

and I run that alone and get a LoadError pointing to something called
custom_require.rb, lines 18 and 24, and mechanize line 14. I'd like to make
more headway this weekend if I can, but I can give feedback for the next week
if someone thinks they can help me get something usable soon. Thanks for
any feedback.

Sincerely, Xeno

Xeno Campanoli wrote:
...

and I run that alone and get a LoadError pointing to something called custom_require.rb, lines 18 and 24, and mechanize line 14. I'd like to make
more headway this weekend if I can, but I can give feedback for the next week
if someone thinks they can help me get something usable soon. Thanks for any feedback.

Looks a like a gems issue, and trouble loading the 'https.rb' file

What version of rubygems are you running?

James

···

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

Xeno Campanoli said:

and I run that alone and get a LoadError pointing to something called
custom_require.rb, lines 18 and 24, and mechanize line 14.

It works fine for me.

The line you are referring to in mechanize.rb is the require for
'net/https', which is actually included with mechanize because it needed
some newer features that are in the Ruby v1.9 version of http and https.
It sounds like you are having load path issues though, because you should
at least have the normal https that comes with Ruby (but is missing a few
features that mechanize needs.)

See if running a file with just a "require 'net/https'" works.

Ryan