about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb')
-rw-r--r--nixpkgs/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb b/nixpkgs/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
index add5db56d1d0..2bf9d84caa06 100644
--- a/nixpkgs/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
+++ b/nixpkgs/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb
@@ -32,10 +32,12 @@ paths.each do |path|
 #
 
 ENV["BUNDLE_GEMFILE"] = #{gemfile.dump}
-ENV["BUNDLE_PATH"] = #{bundle_path.dump}
+ENV.delete 'BUNDLE_PATH'
 ENV['BUNDLE_FROZEN'] = '1'
 
-$LOAD_PATH.unshift #{bundler_path.dump} + "/lib"
+Gem.paths = { 'GEM_HOME' => #{bundle_path.dump} }
+
+$LOAD_PATH.unshift #{File.join(bundler_path, "/lib").dump}
 
 require 'bundler'
 Bundler.setup(#{groups.map(&:dump).join(', ')})