From a72c34696473eafd6370f88cbeb7784e84f2ef5c Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Wed, 11 Feb 2015 15:43:17 -0800 Subject: [PATCH] Inject the GEM_HOME that bundler into puma-wild's env. Fixes #653 --- lib/puma/cli.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/puma/cli.rb b/lib/puma/cli.rb index ef8ba18a..2d9b8811 100644 --- a/lib/puma/cli.rb +++ b/lib/puma/cli.rb @@ -473,8 +473,13 @@ module Puma if puma_lib_dir log "* Pruning Bundler environment" + + home = ENV['GEM_HOME'] + Bundler.with_clean_env do + ENV['GEM_HOME'] = home + wild = File.expand_path(File.join(puma_lib_dir, "../bin/puma-wild")) wild_loadpath = dirs.join(":")