From 99dda758c40a83149300af80131a0078a2858552 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 9 Feb 2018 21:09:18 +0000 Subject: [PATCH] utils: only look for gems in GEM_HOME. This avoids issues where a gem is installed but cannot be found. Fixes #3355. Fixes #3760. --- Library/Homebrew/utils.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 989f05b455..03924dcef2 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -200,6 +200,7 @@ module Homebrew def install_gem_setup_path!(name, version = nil, executable = name) # Match where our bundler gems are. ENV["GEM_HOME"] = "#{ENV["HOMEBREW_LIBRARY"]}/Homebrew/vendor/bundle/ruby/#{RbConfig::CONFIG["ruby_version"]}" + ENV["GEM_PATH"] = ENV["GEM_HOME"] # Make rubygems notice env changes. Gem.clear_paths