Rails server environment info can be accessed from your views with the following syntax
request.env[“NAME_OF_VARIABLE”]
for example request.env[“REQUEST_ADDR”] should return the referring address
From the Rails wiki http://wiki.rubyonrails.org/rails/pages/VariablesInRequestEnv
request.env is a Ruby Array that contains information about a visiting user’s and server environments.
This is similar to the php variable $_SERVER.
request.env is accessible on all pages hosted in a ruby on rails site. The Array contains the following key/value pairs: