diff --git a/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb b/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb index 1dfeaadf650..2bf9d84caa0 100644 --- a/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb +++ b/pkgs/development/ruby-modules/bundled-common/gen-bin-stubs.rb @@ -35,7 +35,9 @@ ENV["BUNDLE_GEMFILE"] = #{gemfile.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(', ')})