Forum: Ruby on Rails Getting IP address through Ruby On Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C6b3fb1b16a9878bc793a90bdc1c9799?d=identicon&s=25 Hema Gonaboina (hema_mca)
on 2008-12-02 14:56
(Received via mailing list)
Hi,
   Can Anyone tell me how to get the IP address of the system through
rails
application?
  The system's IP on which the application running

  Thanks,
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-12-02 15:19
(Received via mailing list)
On 2 Dec 2008, at 13:55, hema gonaboina wrote:

> Hi,
>    Can Anyone tell me how to get the IP address of the system
> through rails application?
>   The system's IP on which the application running
>

Well request.host tells you the host (which isn't quite the same
thing). Obviously you can grep the output of ifconfig -a but that
might not be entirely helpful (eg on the servers that we rung that
would return several ip addresses).

Fred
C6b3fb1b16a9878bc793a90bdc1c9799?d=identicon&s=25 Hema Gonaboina (hema_mca)
on 2008-12-03 06:39
(Received via mailing list)
Thank You Fred it worked ...

On Dec 2, 7:18 pm, Frederick Cheung <frederick.che...@gmail.com>
This topic is locked and can not be replied to.