From 675c61e3e5131d58f9638e88d14d8e8cd7586e6d Mon Sep 17 00:00:00 2001 From: David Marcin Date: Mon, 20 Apr 2020 15:13:21 -0700 Subject: [PATCH] Also load plugins from RUBYLIB --- bundler/lib/bundler/installer.rb | 1 + bundler/lib/bundler/rubygems_integration.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bundler/lib/bundler/installer.rb b/bundler/lib/bundler/installer.rb index 8be4bb118997..4f5b1a165423 100644 --- a/bundler/lib/bundler/installer.rb +++ b/bundler/lib/bundler/installer.rb @@ -243,6 +243,7 @@ def load_plugins end end.flatten Bundler.rubygems.load_plugin_files(path_plugin_files) + Bundler.rubygems.load_env_plugins end def ensure_specs_are_compatible! diff --git a/bundler/lib/bundler/rubygems_integration.rb b/bundler/lib/bundler/rubygems_integration.rb index 9256fa274c79..cc3130a02fa1 100644 --- a/bundler/lib/bundler/rubygems_integration.rb +++ b/bundler/lib/bundler/rubygems_integration.rb @@ -227,6 +227,10 @@ def load_plugin_files(files) Gem.load_plugin_files(files) if Gem.respond_to?(:load_plugin_files) end + def load_env_plugins + Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins) + end + def ui=(obj) Gem::DefaultUserInteraction.ui = obj end