tags:

views:

77

answers:

1

How to check for internet connection using Ruby.

+1  A: 

You could try using Net::HTTP and 'pinging' a reliable URL such as Google and check for an exception indicating they do not have an internet connection.

Kris
Trying example.com would seems more reliable to me.
Damien MATHIEU