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.
Hema G. (Guest)
on 2008-12-02 15: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,
Frederick C. (Guest)
on 2008-12-02 16: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
Hema G. (Guest)
on 2008-12-03 07:39
(Received via mailing list)
Thank You Fred it worked ...

On Dec 2, 7:18 pm, Frederick C. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.