title: How to get ip address, referer, and user agent in ruby?
body: <p>I want to log user's ip address, referer, and user agent.<br>
  In PHP, I can get them from the following variables:</p>
  
  <pre><code>$_SERVER['REMOTE_ADDR']
  $_SERVER['HTTP_REFERER']
  $_SERVER['HTTP_USER_AGENT']
  </code></pre>
  
  <p>How to get them in ruby?<br></p>