-
-
Save thibaudgg/144267 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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