From 3d1c5e00b459b3d9a02f4d1d3a3723d7904f9199 Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Thu, 13 Feb 2020 16:47:12 -0600 Subject: [PATCH] Bundler wins. Just set BUNDLE_GEMFILE manually ...and go back to using Bundler.with_clean_env. --- lib/puma/launcher.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/puma/launcher.rb b/lib/puma/launcher.rb index 81dea80f..b0520235 100644 --- a/lib/puma/launcher.rb +++ b/lib/puma/launcher.rb @@ -300,11 +300,13 @@ module Puma log "* Pruning Bundler environment" home = ENV['GEM_HOME'] - Bundler.with_original_env do + bundle_gemfile = ENV['BUNDLE_GEMFILE'] + Bundler.with_clean_env do require 'pp' puts 'ENV after Bundler.with_original_env:' pp ENV ENV['GEM_HOME'] = home + ENV['BUNDLE_GEMFILE'] = bundle_gemfile ENV['PUMA_BUNDLER_PRUNED'] = '1' args = [Gem.ruby, puma_wild_location, '-I', dirs.join(':'), deps.join(',')] + @original_argv # Ruby 2.0+ defaults to true which breaks socket activation