On Thu, 26 Mar 2009, Vijay wrote:

> Hi,
> I think I may have just found out the reason I was having trouble with
> net:HTTP on my machine. I am running mac os 10.5.6 and the shoes version is
> 0.r1134.
> I have a jetty server running at localhost, port 8080.
> Consider the following shoes sample
> 
> require 'net/http'
  # What happens if you
  require 'resolv-replace'
  # at this point?  I've not had to use it so can't remember the
  # details exactly....
> Shoes.app{
>    para Net::HTTP.get URI.parse('http://127.0.0.1:8080')    <--- 1
>    para "\n"
>    para Net::HTTP.get URI.parse('http://localhost:8080')     <-- 2
> }
> 
> If you run load this sample with shoes application, you will get a result
> [in this case jetty's default page] for line 1. Executing line 2 makes shoes
> throw up a 'Connection refused ' error in console.  It seems to me that
> 'localhost' is not getting resolved correctly.
> 

Macs are Unix based now, so do you have an entry for localhost in
/etc/hosts or whatever database (NIS, NIS+, ??) you normally use
for this kind of thing?  I never seem to get to use Macs, so plead
vast quantities of ignorance about them.

Does it behave sensibly for other pages you might grab, www.ruby-lang.org,
and so on?

> I am attaching a screen shot of the console with this mail.
> 
> Regards,
> Vijay
> 
> PS - I have  an earlier post titled 'help with http post in shoes'
> mentioning similar issue
> 

        HTH
        Hugh

Reply via email to