M
meaneyedcat
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:
1. I have shut down all my firewalls
2. I can access the same web sites with my browser
3. I setup a Tomcat servlet container on localhost, and the above code
still hangs (even using 127.0.0.1, 192.168.1.XXX, localhost)
4. When I try to run Ruby on Rails, the server won't accept a
connections from my browser (Rails shows no errors and logs no
messages, it too effectively hangs)
5. When I try to do a /path/to/gem update, it hangs
6. All other ruby apps seem to run fine if they do not access the net.
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?
Any help is GREATLY appreciated!
Thanks!
BCOT
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:
1. I have shut down all my firewalls
2. I can access the same web sites with my browser
3. I setup a Tomcat servlet container on localhost, and the above code
still hangs (even using 127.0.0.1, 192.168.1.XXX, localhost)
4. When I try to run Ruby on Rails, the server won't accept a
connections from my browser (Rails shows no errors and logs no
messages, it too effectively hangs)
5. When I try to do a /path/to/gem update, it hangs
6. All other ruby apps seem to run fine if they do not access the net.
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?
Any help is GREATLY appreciated!
Thanks!
BCOT