Forum: Ruby on Rails Using request.env['REMOTE_HOST']

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.
Pete (Guest)
on 2006-03-28 21:13
Hi,

I'm currently using request.env['REMOTE_HOST'] to pull back the remote
users IP address. This worked fine in development (and production) under
Webrick but when I tried to use it with mongrel, it kicked back an
error.

Is there a more appropriate way to find out the remote users IP address?


Thanks in advance!
Jakob L. Skjerning (Guest)
on 2006-03-28 23:24
(Received via mailing list)
Pete wrote:
> I'm currently using request.env['REMOTE_HOST'] to pull back the remote
> users IP address. This worked fine in development (and production) under
> Webrick but when I tried to use it with mongrel, it kicked back an
> error.
>
> Is there a more appropriate way to find out the remote users IP address?

request.remote_ip() -
http://api.rubyonrails.com/classes/ActionControlle...
This topic is locked and can not be replied to.