From 359cb697db83d9db0558abce4aea7f84259cac1e Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Thu, 13 Feb 2020 15:39:49 -0600 Subject: [PATCH] When is Bundler loaded by puma-wild? --- bin/puma-wild | 1 + lib/puma/configuration.rb | 4 ++++ lib/puma/launcher.rb | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/puma-wild b/bin/puma-wild index b3ba0152e3..9bbd1e3567 100644 --- a/bin/puma-wild +++ b/bin/puma-wild @@ -28,4 +28,5 @@ require 'puma/cli' cli = Puma::CLI.new ARGV +puts "puma-wild defined?(Bundler) = #{defined?(Bundler).inspect}" cli.run diff --git a/lib/puma/configuration.rb b/lib/puma/configuration.rb index e8e546d69c..f587c0c8af 100644 --- a/lib/puma/configuration.rb +++ b/lib/puma/configuration.rb @@ -299,8 +299,12 @@ def rack_builder # a Gemfile if ENV.key? 'PUMA_BUNDLER_PRUNED' begin + puts '>>>> loading Bundler...' require 'bundler/setup' rescue LoadError + puts 'failed' + else + puts 'success' end end diff --git a/lib/puma/launcher.rb b/lib/puma/launcher.rb index a45757f930..98025d2b8b 100644 --- a/lib/puma/launcher.rb +++ b/lib/puma/launcher.rb @@ -286,7 +286,9 @@ def puma_wild_location end def prune_bundler - return if ENV.key?('PUMA_BUNDLER_PRUNED') + puts '>>>> prune_bundler starting...' + puts "prune_bundler defined?(Bundler) = #{defined?(Bundler).inspect}" + #return if ENV.key?('PUMA_BUNDLER_PRUNED') return unless defined?(Bundler) require_rubygems_min_version!(Gem::Version.new("2.2"), "prune_bundler") unless puma_wild_location