require 'resolv-replace'
might help, or google for ruby asynchronous dns
I know rev has one, and also there is a package for eventmachine that 
does it.

The problem is that when it does DNS lookup it hangs forever (I'd 
imagine) waiting for a response.

This might help it.

loop do
 break if system("ping 64.233.187.99")
 sleep 1
end
puts "Internet working!"


GL.
-R

Cory Cory wrote:
> Roger Pack wrote:
>> I usually do something like this on my machine
>> 
> 
> Even that caused Ruby to hang.
> I am using Ubuntu.
-- 
Posted via http://www.ruby-forum.com/.