diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index f1632c9ee29..f66716b39d5 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -60,9 +60,6 @@ def run "the --binstubs option will be removed in favor of `bundle binstubs`" end - # rubygems plugins sometimes hook into the gem install process - Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins) - Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins? definition = Bundler.definition diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb index 5aac47bd09f..a8724f6a136 100644 --- a/lib/bundler/cli/update.rb +++ b/lib/bundler/cli/update.rb @@ -54,9 +54,6 @@ def run Bundler.settings[:jobs] = opts["jobs"] if opts["jobs"] - # rubygems plugins sometimes hook into the gem install process - Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins) - Bundler.definition.validate_runtime! Installer.install Bundler.root, Bundler.definition, opts Bundler.load.cache if Bundler.app_cache.exist? diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 824b1a45cd1..c4892ff186b 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -159,6 +159,7 @@ def generate_standalone_bundler_executable_stubs(spec) # that said, it's a rare situation (other than rake), and parallel # installation is SO MUCH FASTER. so we let people opt in. def install(options) + Bundler.rubygems.load_plugins force = options["force"] jobs = 1 jobs = [Bundler.settings[:jobs].to_i - 1, 1].max if can_install_in_parallel? diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 1c44ef3ddd9..bfabd966434 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -194,6 +194,10 @@ def loaded_gem_paths end end + def load_plugins + Gem.load_plugins + end + def ui=(obj) Gem::DefaultUserInteraction.ui = obj end