So far, it\’s RoR

Ruby on Rails, PostgreSQL, SVN, etc….

View for version numbers, host names, IPs, etc

Posted by Chirag Patel on July 26, 2008

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 : http://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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: