Skip to content

Commit

Permalink
Load global gems when using Bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
yous committed Jul 8, 2014
1 parent d44c84b commit 015d77c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions irbrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# https://github.com/bundler/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

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:PROMPT_MODE] = :SIMPLE

Expand Down

0 comments on commit 015d77c

Please sign in to comment.