The sys-host library provides information about the current machine that your program is running on. Specifically, it returns hostname, IP address information, aliases and so on.
Daniel J. Berger
gem "sys-host", "~> 0.6.2"