diff --git a/lib/chef-dk/helpers.rb b/lib/chef-dk/helpers.rb index 3e06b2ead..b2e129cf0 100644 --- a/lib/chef-dk/helpers.rb +++ b/lib/chef-dk/helpers.rb @@ -85,7 +85,7 @@ def omnibus_env { 'PATH' => "#{omnibus_bin_dir}:#{user_bin_dir}:#{omnibus_embedded_bin_dir}:#{ENV['PATH']}", 'GEM_ROOT' => Gem.default_dir.inspect, - 'GEM_HOME' => Gem.paths.home, + 'GEM_HOME' => Gem.user_dir, 'GEM_PATH' => Gem.path.join(':'), } end diff --git a/spec/unit/command/exec_spec.rb b/spec/unit/command/exec_spec.rb index 737d0120f..ba14724b4 100644 --- a/spec/unit/command/exec_spec.rb +++ b/spec/unit/command/exec_spec.rb @@ -73,7 +73,7 @@ def run_command let(:expected_GEM_ROOT) { Gem.default_dir.inspect } - let(:expected_GEM_HOME) { ENV['GEM_HOME'] } + let(:expected_GEM_HOME) { Gem.user_dir } let(:expected_GEM_PATH) { Gem.path.join(':') } @@ -107,7 +107,7 @@ def run_command let(:expected_GEM_ROOT) { Gem.default_dir.inspect } - let(:expected_GEM_HOME) { ENV['GEM_HOME'] } + let(:expected_GEM_HOME) { Gem.user_dir } let(:expected_GEM_PATH) { Gem.path.join(':') } diff --git a/spec/unit/command/shell_init_spec.rb b/spec/unit/command/shell_init_spec.rb index b34b8181e..e5b2e2d9c 100644 --- a/spec/unit/command/shell_init_spec.rb +++ b/spec/unit/command/shell_init_spec.rb @@ -38,7 +38,7 @@ let(:expected_gem_root) { Gem.default_dir.to_s } - let(:expected_gem_home) { ENV['GEM_HOME'] } + let(:expected_gem_home) { Gem.user_dir } let(:expected_gem_path) { Gem.path.join(':') }