thanks all above reply,
the Net::Ping::External could not work, but the  Net::Ping::TCP. works.

 pt = Net::Ping::TCP.new("#{ip_list}")
         if pt.ping
         # puts "#{ip_list}  TCP ping successful"
        else
         # puts "ping unsuccessful: #{pt.exception}"
         end

Regards
Edward

-- 
Posted via http://www.ruby-forum.com/.