From 7aa067e7b6a4a1c90c3303e3e4b18aeeaad638af Mon Sep 17 00:00:00 2001 From: Andy Rossmeissl Date: Wed, 14 Dec 2011 11:19:05 -0600 Subject: [PATCH] Do not run Bundler.setup from main library. Imagine a typical use case for grb: * User moves to a project dir (~/myproj) * User uses grb (grb create funtimes) * grb executes Bundler.setup, which munges Ruby's load path to match myproj's Gemfile.lock * grb tries to require "rainbow," which isn't in myproj's Gemfile.lock * grb dies Gem dependencies are better handled by Rubygems during install, and later by Bundler when running against an actual app's Gemfile. --- lib/git_remote_branch.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/git_remote_branch.rb b/lib/git_remote_branch.rb index de3d3b4..507a386 100644 --- a/lib/git_remote_branch.rb +++ b/lib/git_remote_branch.rb @@ -1,13 +1,4 @@ require 'rubygems' - -begin - require 'bundler/setup' -rescue Bundler::GemNotFound => e - STDERR.puts e.message - STDERR.puts "Try running `bundle install`." - exit! -end - require 'rainbow' begin