Skip to content

Instantly share code, notes, and snippets.

@binarycode
Created October 5, 2012 19:22
Show Gist options
  • Save binarycode/3841815 to your computer and use it in GitHub Desktop.
Save binarycode/3841815 to your computer and use it in GitHub Desktop.
Use Pry everywhere + Bundle everything
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953
if defined?(::Bundler)
global_gemset = ([ENV['GEM_PATH'], ENV['_ORIGINAL_GEM_PATH']].join(":")).split(':').grep(/ruby.*@global/).first
if global_gemset
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*")
all_global_gem_paths.each do |p|
gem_path = "#{p}/lib"
$LOAD_PATH << gem_path
end
end
end
# Use Pry everywhere
require "rubygems"
require 'pry'
Pry.start
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment