Skip to content

Instantly share code, notes, and snippets.

@dannysmith
Created August 26, 2009 10:26
Show Gist options
  • Save dannysmith/175449 to your computer and use it in GitHub Desktop.
Save dannysmith/175449 to your computer and use it in GitHub Desktop.
My current .irbrc file.
require 'rubygems'
require 'pp'
require 'logger'
#Load Wribble (colouring etc in irb)
begin
require 'wirble'
Wirble.init
Wirble.colorize
rescue LoadError => err
warn "Couldn't load wribble: #{err}"
end
#Load Hirb (pretty formatting in irb)
begin
require 'hirb'
Hirb.enable
rescue LoadError => err
warn "Couldn't load hirb: #{err}"
end
#Set Log display in script/console
if ENV.include?('RAILS_ENV')&& !Object.const_defined?('RAILS_DEFAULT_LOGGER')
Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT))
end
#Set up Aliasses
alias q exit
IRB.conf[:AUTO_INDENT]=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment