On Mar 19, 2006, at 4:46 AM, Alex wrote:
> Basically I have a controller with this:
>
> @lang = params[''lang''] || ''en''
> @errors = request.raw_post
> @feed_stats >
Net::HTTP.post_form(URI.parse("http://www.google.com/tbproxy/spell?
> lang="
> + @lang), @errors)
> render :text => @feed_stats
>
> However whenever I run this I get an error message:
> undefined method `post_form'' for Net::HTTP:Class
>
> I''ve included
> require ''net/http''
> require ''uri''
> in my enviroment.rb
>
> can anyone help?
>
post_form is in ruby 1.8.4 and not in 1.8.2 So to get that method you
need to upgrade your ruby install. This hjas come up a few times
because the docs got cross pollenated to look like post_form is in
1.8.2 but it is not.
Cheers-
-Ezra