Forum: Ruby on Rails getting the local IP

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.
Joe C. (Guest)
on 2006-04-20 21:58
Hi,

In the request object you can get the local domain name using a method
similar to this:
domain_name = @request.domain

I looked high and low and can't seem to find a way to get the the actual
ip number of that domain.

Does any one have any ideas?

Joe
Dan P. (Guest)
on 2006-04-21 01:54
Joe C. wrote:
> Hi,
>
> In the request object you can get the local domain name using a method
> similar to this:
> domain_name = @request.domain
>
> I looked high and low and can't seem to find a way to get the the actual
> ip number of that domain.
>
> Does any one have any ideas?
>
> Joe


@request.remote_ip    ?????
This topic is locked and can not be replied to.