Skip to content

Instantly share code, notes, and snippets.

@thibaudgg
Forked from bastien/irbrc.rb
Created July 10, 2009 05:57
Show Gist options
  • Save thibaudgg/144267 to your computer and use it in GitHub Desktop.
Save thibaudgg/144267 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'wirble'
require 'irb/completion'
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
Wirble.init(:skip_history => true)
Wirble.colorize
alias q exit
alias e exit
def r; reload! end
# To show SQL Statements in the rails console
# copy this code to ~/.irbrc
# code found there http://frozenplague.net/2008/12/showing-sql-statements-in-scriptconsole/
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
require 'logger'
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