Skip to content

Instantly share code, notes, and snippets.

@baldowl
Created January 26, 2011 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baldowl/796516 to your computer and use it in GitHub Desktop.
Save baldowl/796516 to your computer and use it in GitHub Desktop.
.irbrc
require 'rubygems'
require 'irb/completion'
if ENV['RAILS_ENV']
# Redirecting ActiveRecord's messages to stdout. RoR2
require 'logger'
Object.const_set :RAILS_DEFAULT_LOGGER, Logger.new(STDOUT)
elsif Object.const_defined? :RAILS_ENV
# Redirecting ActiveRecord's messages to stdout. RoR3
ActiveRecord::Base.logger = Logger.new STDOUT
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment