Get own IP address
ruby, ruby-on-rails
Solution
Try:
require 'socket'
ip=Socket.ip_address_list.detect{|intf| intf.ipv4_private?}
ip.ip_address if ip
Problem
How to get my own IP address with Rails? When I do it like this I got: `127.0.0.1` ``` @ip = request.remote_ip ``` Is there any way to get the Public IP?