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

When is Bundler loaded? (this is nuts)

This commit is contained in:
Tim Morgan 2020-02-13 16:01:47 -06:00
parent 0d020df4e1
commit d804495812
2 changed files with 7 additions and 3 deletions

View file

@ -3,6 +3,7 @@
# Copyright (c) 2014 Evan Phoenix
#
puts "puma-wild 111 defined?(Bundler) = #{defined?(Bundler).inspect}"
require 'rubygems'
gems = ARGV.shift
@ -15,18 +16,22 @@ if gems == "-I"
gems = ARGV.shift
end
p gems
gems.split(",").each do |s|
name, ver = s.split(":",2)
gem name, ver
end
puts "puma-wild 222 defined?(Bundler) = #{defined?(Bundler).inspect}"
module Puma; end
Puma.const_set("WILD_ARGS", ["-I", inc, gems])
require 'puma/cli'
puts "puma-wild 333 defined?(Bundler) = #{defined?(Bundler).inspect}"
cli = Puma::CLI.new ARGV
puts "puma-wild defined?(Bundler) = #{defined?(Bundler).inspect}"
cli.run

View file

@ -300,8 +300,7 @@ module Puma
log "* Pruning Bundler environment"
home = ENV['GEM_HOME']
#Bundler.with_original_env do
Bundler.with_clean_env do
Bundler.with_original_env do
ENV['GEM_HOME'] = home
ENV['PUMA_BUNDLER_PRUNED'] = '1'
args = [Gem.ruby, puma_wild_location, '-I', dirs.join(':'), deps.join(',')] + @original_argv