From: Mike Date: 2005-05-16T01:16:16+09:00 Subject: Re: I can't establish network connections with Ruby. > For some reason, I am unable to establish network connections > anymore with Ruby code. For example, I execute the following code: > > 01 require 'net/http' > 02 Net::HTTP.start('www.pragmaticprogrammer.com') do |http| > 03 response = http.get('/index.html') > 04 puts response.code > 05 end > > And the application will simply hang. I don't believe it is a > firewall issue because and I believe it is specific to (my > install of) Ruby > because: > > > I have uninstalled Ruby and reinstalled it, but that didn't > help. I am running on WindowsXP SP2. Does Ruby depend on any > components of Windows that may have become corrupt? > I tried your code and it worked just fine for me - so there's no problems there. If you reinstalled Ruby, then that tends to rule out the possibility of the Net library being FUBAR'ed. Can you telnet www.pragmaticprogrammer.com 80 And then type GET when you reach a connected blinking cursor? Do you connect and see a returned bunch of HTML? If that fails, then it's your machine. If not, then we know that you can at least get outgoing connections from your machine. Also, you can try typing: netsh firewall show state To see what the exact state of the XP firewall is for certain. It should say "Operational mode = Disabled". Do you have any additional firewalls -installed- on the computer (even if they're disabled)? I've seen many cases where ZoneAlarm does some crazy stuff to your machine (even when it's disabled and removed). Hope some of that helps. -M