1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Bundler wins. Just set BUNDLE_GEMFILE manually

...and go back to using Bundler.with_clean_env.
This commit is contained in:
Tim Morgan 2020-02-13 16:47:12 -06:00
parent d84e0ae15b
commit 3d1c5e00b4

View file

@ -300,11 +300,13 @@ module Puma
log "* Pruning Bundler environment" log "* Pruning Bundler environment"
home = ENV['GEM_HOME'] home = ENV['GEM_HOME']
Bundler.with_original_env do bundle_gemfile = ENV['BUNDLE_GEMFILE']
Bundler.with_clean_env do
require 'pp' require 'pp'
puts 'ENV after Bundler.with_original_env:' puts 'ENV after Bundler.with_original_env:'
pp ENV pp ENV
ENV['GEM_HOME'] = home ENV['GEM_HOME'] = home
ENV['BUNDLE_GEMFILE'] = bundle_gemfile
ENV['PUMA_BUNDLER_PRUNED'] = '1' ENV['PUMA_BUNDLER_PRUNED'] = '1'
args = [Gem.ruby, puma_wild_location, '-I', dirs.join(':'), deps.join(',')] + @original_argv args = [Gem.ruby, puma_wild_location, '-I', dirs.join(':'), deps.join(',')] + @original_argv
# Ruby 2.0+ defaults to true which breaks socket activation # Ruby 2.0+ defaults to true which breaks socket activation