1 From d69249d0ff210316121b44d971ddd2439b1bc393 Mon Sep 17 00:00:00 2001
2 From: zimbatm <zimbatm@zimbatm.com>
3 Date: Wed, 21 Sep 2016 09:40:39 +0100
4 Subject: [PATCH 3/3] gem install default to user
6 Default to not installing gems to the read-only system derivation.
8 lib/rubygems/path_support.rb | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
11 diff --git a/lib/rubygems/path_support.rb b/lib/rubygems/path_support.rb
12 index ed680d65..749b9ea6 100644
13 --- a/lib/rubygems/path_support.rb
14 +++ b/lib/rubygems/path_support.rb
15 @@ -24,7 +24,7 @@ class Gem::PathSupport
16 # hashtable, or defaults to ENV, the system environment.
19 - @home = normalize_home_dir(env["GEM_HOME"] || Gem.default_dir)
20 + @home = normalize_home_dir(env["GEM_HOME"] || Gem.user_dir || Gem.default_dir)
21 @path = split_gem_path env["GEM_PATH"], @home
23 @spec_cache_dir = env["GEM_SPEC_CACHE"] || Gem.default_spec_cache_dir