title: Get hostname from Rails controller
body: <p>I am trying to get the hostname of the machine which a rails application is running on from the controller.</p>
  
  <p>What would be the best way to do this taking into account it should work on both windows and linux?</p>