title: Ruby: get local IP (nix)
body: <p>I need to get my IP (that is DHCP). I use this in my <code>environment.rb</code>:</p>
  
  <pre><code>LOCAL_IP = `ifconfig wlan0`.match(/inet addr:(\d*\.\d*\.\d*\.\d*)/)[1] || "localhost"
  </code></pre>
  
  <p>But is there rubyway or more clean solution?</p>