The sys-uname library provides an interface for gathering information about your current platform. The library is named after the Unix 'uname' command but also works on MS Windows. Available information includes OS name, OS version, system name and so on. Additional information is available for certain platforms.
Gemfile gem 'sys-uname', '~> 0.9.1'
install gem install sys-uname -v 0.9.1