From: Daniel Berger Date: 2005-07-17T23:20:54+09:00 Subject: Re: get host name Mark Volkmann wrote: > How can I get the host name for the machine I'm running on from Ruby code? > I don't want to exec a Unix command to do this because I want it to > also work under Windows. > I want this for building a server URL that I'll be using with drb. > I don't want to hardcode a host name. require "socket" puts Socket.gethostname Regards, Dan