Sijo Kg wrote:
> Could you please tell the code to get the IPaddress of my machine

Your machine may have multiple IP addresses, but assuming its hostname 
has been set up properly, the following may do the trick:

require 'socket'
ip = IPSocket.getaddress(Socket.gethostname)
-- 
Posted via http://www.ruby-forum.com/.