Skip to content

Instantly share code, notes, and snippets.

@phuesler
Created August 14, 2009 17:47
Show Gist options
  • Save phuesler/167983 to your computer and use it in GitHub Desktop.
Save phuesler/167983 to your computer and use it in GitHub Desktop.
require 'rubygems'
script_console_running = ENV.include?('RAILS_ENV') && IRB.conf[:LOAD_MODULES] && IRB.conf[:LOAD_MODULES].include?('console_with_helpers')
if script_console_running
require 'logger'
Object.const_set(:RAILS_DEFAULT_LOGGER, Logger.new(STDOUT))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment