Skip to content

Instantly share code, notes, and snippets.

@baldowl baldowl/.irbrc
Created Jan 26, 2011

Embed
What would you like to do?
.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
You can’t perform that action at this time.