This is useful if you want to log the ip address of the person using your rails app (except when the person is behind a proxy, thanks James!):

request.env['REMOTE_ADDR']

Taken from this ruby thread.