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.
7b2a4ea7a2c486b1b0ceab3c6d4680d9?d=identicon&s=25 Joe Cairns (diregnome)
on 2006-04-20 19: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
49c38b11918618294f164df6cd9d84c1?d=identicon&s=25 Dan Perez (perezda)
on 2006-04-20 23:54
Joe Cairns 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.