Merge pull request #3781 from MikeMcQuaid/gem-path-home

utils: only look for gems in GEM_HOME.
This commit is contained in:
Mike McQuaid 2018-02-10 19:27:43 +00:00 committed by GitHub
commit 021fe22e3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,6 +200,7 @@ module Homebrew
def install_gem_setup_path!(name, version = nil, executable = name) def install_gem_setup_path!(name, version = nil, executable = name)
# Match where our bundler gems are. # Match where our bundler gems are.
ENV["GEM_HOME"] = "#{ENV["HOMEBREW_LIBRARY"]}/Homebrew/vendor/bundle/ruby/#{RbConfig::CONFIG["ruby_version"]}" 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. # Make rubygems notice env changes.
Gem.clear_paths Gem.clear_paths