Last active
July 16, 2018 19:50
-
-
Save jsmecham/7001275 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Save History ------------------------------------------------------- | |
require "irb/ext/save-history" | |
IRB.conf[:SAVE_HISTORY] = 200 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history" | |
# Awesome Print ------------------------------------------------------ | |
begin | |
require "awesome_print" | |
AwesomePrint.irb! | |
rescue LoadError => err | |
warn "Couldn't load Awesome Print: #{err}" | |
end | |
# Wirble -------------------------------------------------------------- | |
begin | |
# load and initialize wirble | |
require "wirble" | |
Wirble.init | |
Wirble.colorize | |
rescue LoadError => err | |
warn "Couldn't load Wirble: #{err}" | |
end | |
# Bond --------------------------------------------------------------- | |
begin | |
require "bond" | |
Bond.start | |
rescue LoadError => err | |
warn "Couldn't load Bond: #{err}" | |
end | |
# Rails -------------------------------------------------------------- | |
# Show log in Rails console | |
if defined? Rails | |
require 'logger' | |
if Rails.version =~ /^2\./ # Rails 2.3 | |
Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT)) | |
else # Rails 3 | |
ActiveRecord::Base.logger = Logger.new(STDOUT) if defined? ActiveRecord | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment