Joe, Here's a partial answer to why puts ENV["COMPUTERNAME"] returned nil.
Not every environment variable that is available on Windows is also on OSX (or Linux). To see which Env variables are available on your platform try this code, the results will differ form Windows, to OSX, to Linux. irb ENV.each do | key, value | puts key.to_s + " = " + value.to_s end On Oct 20, 8:47 am, Joe Fl <joeflec...@gmail.com> wrote: > Hi, > > This is a ruby question but how do I get the name of my MAC using > ruby. > > I have found: > > require 'socket' > puts Socket.gethostname > > (not what I am looking for) > > puts ENV["COMPUTERNAME"] > > puts ENV['USERDOMAIN'] > puts ENV['LOGONSERVER'] > > they all return nil > > any help would be appreciated. > > Thank you, > Joe -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com