Ok, I’ve searched everywhere trying to figure this one out… Mechanize
(installed from gems) is trying to reference a function that it can’t
- Mechanize (install gem mechanize)
- the newest Ruby / Rails versions.
I’m getting this error:
undefined method `add_header’ for #<Net::HTTP::Post POST>
I know that mechanize is doing something with some files from Ruby 1.9
has a file that says this:
required due to the missing get_fields method in Ruby 1.8.2
$LOAD_PATH.unshift File.join(File.dirname(FILE), “mechanize”,
and that it has this file:
So, for some reason it would appear that mechanize can’t see the
It had the same problem with the “get_fields” function (which is in the
place, and is a thing the mechanize developer added since Ruby 1.8
have the response.get_fields function), but I got around that by adding
return nil unless response.header[key.downcase]
then changing the references to “response.get_fields(…)” to
“get_fields2(response,…)” … But that approach doesn’t work for the
Thanks for any help!
Chief Technical Officer
[mailto:firstname.lastname@example.org]On Behalf Of Peter M.
Sent: Friday, November 18, 2005 1:10 PM
Subject: [Rails] acts_as_list with has_and_belongs_to_many
I found the problem below on the Rails wiki and have the very same
problem. Can anyone suggest a solution that does not involve an extra
like on the wiki?
I’m looking for a Howto that would explain how to use ActsAsList where
have something like the following:
The position in the books_categories table is relative to the category.
Thus, under one category book A might be in position 4, while in another
category it might be in position 1.