From: Dan Tenenbaum Date: 2006-03-10T09:06:42+09:00 Subject: Net::HTTP.post_form missing method error I had some code that used to work and now all of a sudden it stopped working. Here is the minimal code to illustrate the problem: #!/usr/bin/ruby require 'net/http' require 'uri' parms = {:client=>"safari", :rls=>"en", :q => "myquery", :ie => "UTF-8", :oe => "UTF-8"} url = "http://www.google.com/search" res = Net::HTTP.post_form(URI.parse(url), parms) print res.body print The code fails with this error: ./foo.rb:8: undefined method `post_form' for Net::HTTP:Class (NoMethodError) However, my code is almost identical to the example at: http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html#M001204 ...which presumably should work. This is on a mac. I tried it on a windows box and it failed with the same error. I tried it on a linux box and it worked (the request format isn't quite right, but *something* came back from the server and was printed out, so for the purposes of this post, it "works"). Anyone have any ideas as to why? Apparently I have the Net::HTTP class but it doesn't have the post_form method in it....anymore.... Hope someone can help. -- Posted via http://www.ruby-forum.com/.