From: Peter Date: 2003-09-27T02:22:51+09:00 Subject: Re: TCPSocket.gethostbyname difficulties > When I run this, I only get the machine name, not the FQDN of my > computer: > > ruby -e "require 'socket'; puts Socket.gethostbyname(Socket.gethostname)[0]" > juno > > > ruby -e "require 'socket'; p Socket.gethostbyname(Socket.gethostname)" > ["juno", [], 2, "\235_/A"] You're right. I tested it on 3 machines, and on 2 it gave the FQDN, on 1 it returned localhost. I had the hostname on that last machine point to the external IP-address rather than localhost and then I had the same problem. About the 2 machines it did work on: one is a WinXP machine, the other is a linux machine at work. Apparently both have something my own linux machine has not... > Is there a way to get the full name? I'm out of ideas. None of the other calls I tested could get past the hostname for some weird reason. Peter