Skip to content

Instantly share code, notes, and snippets.

@adamcrown
adamcrown / .irbrc
Last active Jul 28, 2016
My Bundler proof .irbrc file including wirble, awesome_print, hirb, console logging and route helpers
View .irbrc
require 'rubygems' unless defined? Gem # rubygems is only needed in 1.8
def unbundled_require(gem)
loaded = false
if defined?(::Bundler)
Gem.path.each do |gems_path|
gem_path = Dir.glob("#{gems_path}/gems/#{gem}*").last
unless gem_path.nil?
$LOAD_PATH << "#{gem_path}/lib"
You can’t perform that action at this time.