Skip to content
Browse files

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.
  • Loading branch information...
1 parent ecc6218 commit 7aa067e7b6a4a1c90c3303e3e4b18aeeaad638af @rossmeissl rossmeissl committed
Showing with 0 additions and 9 deletions.
  1. +0 −9 lib/git_remote_branch.rb
9 lib/git_remote_branch.rb
@@ -1,13 +1,4 @@
require 'rubygems'
- require 'bundler/setup'
-rescue Bundler::GemNotFound => e
- STDERR.puts e.message
- STDERR.puts "Try running `bundle install`."
- exit!
require 'rainbow'

0 comments on commit 7aa067e

Please sign in to comment.
Something went wrong with that request. Please try again.