Skip to content

Instantly share code, notes, and snippets.

@wmene
Created October 15, 2014 17:37
Show Gist options
  • Save wmene/1c3b6ce7664c6a7f7733 to your computer and use it in GitHub Desktop.
Save wmene/1c3b6ce7664c6a7f7733 to your computer and use it in GitHub Desktop.
Use pry everywhere
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953
if defined?(::Bundler)
global_gemset = ENV['GEM_PATH'].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'
require 'pry-byebug'
Pry.start
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment