Your script is not complete, please provide a complete script that we
can reproduce.
>
> I see my 1.9.3 install of Ruby gave me a 1.9.1 path component to
> Net::HTTP code, is that an issue??
>
1.9.1 is API version compatibility, Ruby 1.9.3 is API compatible with
Ruby 1.9.1 and 1.9.2, is not Ruby version (the one you get when using
-v)
> What am I missing here?
>
Please provide a simple script that recreates the issue and we will be
able to help you, from skimming your snippets nothing seems wrong, so
there must be something you're missing.
The best is try to reproduce it with the minimum detail.
PS: Sorry took so long to notice your message, Google Groups didn't
email us (admins) about it.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
The problem is your code:
http://rubydoc.info/stdlib/net/1.9.2/Net/HTTP:get
You're sending "nil" to an expected Hash (header options)
If you remove "nil" from get it will work:
V:\>ruby t.rb
Fetching: www.rubycentral.com
Fetching: www.awl.com
Fetching: www.pragmaticprogrammer.com
Got www.rubycentral.com: OK
Got www.pragmaticprogrammer.com: Found
Got www.awl.com: Moved Temporarily
Please don't do that...
I pointed you to the documentation where it states that the second
parameter of get method is a Hash, and you're sending a nil instead:
resp, data = h.get('/', nil )
Change that line to:
resp, data = h.get('/')
Solves the error.
There is no need to patch, simple to read the documentation. If you
don't want to send additional headers then don't send them, leave the
OPTIONAL argument out.
PS: In case the one-liner correction and the link to the documentation
aren't enough, your script, corrected, here:
https://gist.github.com/1936352
--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To post to this group, send email to rubyin...@googlegroups.com.
To unsubscribe from this group, send email to rubyinstalle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyinstaller?hl=en.