From: Matt Harrison Date: 2009-01-11T13:04:49+09:00 Subject: Re: Unique identify computer (both Windows and MacOSX) Daniel Berger wrote: > > On Jan 10, 4:04 pm, Jarmo Pertman wrote: >> puts RUBY_PLATFORM >> >> Fernando Malard wrote: >>> Hello, >>> How can I unique identify the OS where my Ruby code is running? >>> I can do this using specific Win32 features but I looking for an OS >>> independent approach...maybe using the HD serial? >>> Regards, >>> Fernando. > > No, don't use RUBY_PLATFORM because it won't work with JRuby, and > possibly other implementations. > > Instead, require "rbconfig", then check Config::CONFIG['host_os']. > > Regards, > > Dan > I believe the OP wants to get a unique identifier for each host, something like a GUID. I have no idea how you would make this cross platform though, maybe IP address but those change, or HD serial, but again that's changable... Windows supports GUIDs inherantly however AFAIK *nix systems don't. Sorry I don't have a solution. Matt