Getting IP address through Ruby On Rails

0 views
Skip to first unread message

hema gonaboina

unread,
Dec 2, 2008, 8:55:21 AM12/2/08
to ruby-on-rails-programmin...@googlegroups.com, rubyonra...@googlegroups.com
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 Cheung

unread,
Dec 2, 2008, 9:18:20 AM12/2/08
to rubyonra...@googlegroups.com
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
> Thanks,
>
> >

Hema

unread,
Dec 3, 2008, 12:39:22 AM12/3/08
to Ruby on Rails: Talk
Thank You Fred it worked ...

On Dec 2, 7:18 pm, Frederick Cheung <frederick.che...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages