Skip to content

Instantly share code, notes, and snippets.

@jpemberthy
Created May 30, 2013 23:35
Show Gist options
  • Select an option

  • Save jpemberthy/5682079 to your computer and use it in GitHub Desktop.

Select an option

Save jpemberthy/5682079 to your computer and use it in GitHub Desktop.
require 'rubygems' rescue nil
if defined? Bundler
Gem.post_reset_hooks.reject! { |hook| hook.source_location.first =~ %r{/bundler/} }
Gem::Specification.reset
load 'rubygems/custom_require.rb'
end
if defined? Rails
begin
require 'wirble'
require 'hirb'
Wirble.init
Wirble.colorize
Hirb::View.enable
rescue LoadError
end
end
railsrc_path = File.expand_path('~/.railsrc')
if ( ENV['RAILS_ENV'] || defined? Rails ) && File.exist?( railsrc_path )
begin
load railsrc_path
rescue Exception
warn "Could not load: #{ railsrc_path }" # because of $!.message
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment