Posts Tagged “REMOTE_ADDR”

Here’s some code (and rendered view) for various version numbers, host names, IPs for Ruby, Rails, PostgreSQL, SMTP.


<b>Network</b><br>
UNIX hostname: <code><%= `hostname` %></code><br>
SERVER_ADDR: <code><%= request.env["SERVER_ADDR"].to_s %></code> <br>
HOST_NAME : <code><%= request.host %></code> <br>
REMOTE_ADDR: <code><%= request.env["REMOTE_ADDR"].to_s %></code> <br>
<br>
<b>Software</b><br>
Database: <code><%= ActiveRecord::Base.connection.select_value(“SELECT  VERSION()”) %></code><br>
Email delivery method: <code><%= ActionMailer::Base.delivery_method %></code><br>
SMTP server: <code> <%= ActionMailer::Base.smtp_settings[:address] %></code><br>
Ruby: <code> <%= “#{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) on #{RUBY_PLATFORM}” %> </code><br>
Rails: <code> <%= “#{Rails::VERSION::STRING}” %> </code><br>

Network
UNIX hostname: server1.mydomain.com
SERVER_ADDR: 10.2.128.100
HOST_NAME : www.mydomain.com
REMOTE_ADDR: 12.207.103.224

Software
Database: PostgreSQL 8.3.3 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
Email delivery method: activerecord
SMTP server: localhost
Ruby: 1.8.6 (2007-03-13) on x86_64-linux
Rails: 2.1.0

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , ,

Comments No Comments »