Skip to content

Commit

Permalink
Merge pull request #595 from k0kubun/default-gem-bundler
Browse files Browse the repository at this point in the history
Avoid -I rubylibdir with default-gem bundler
  • Loading branch information
kamipo authored Jul 10, 2019
2 parents f65c0b8 + 2fc1d35 commit caa09ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/spring/application_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def start_child(preload = false)
@child, child_socket = UNIXSocket.pair

Bundler.with_original_env do
bundler_dir = File.expand_path("../..", $LOADED_FEATURES.grep(/bundler\/setup\.rb$/).first)
@pid = Process.spawn(
{
"RAILS_ENV" => app_env,
Expand All @@ -102,7 +103,7 @@ def start_child(preload = false)
"SPRING_PRELOAD" => preload ? "1" : "0"
},
"ruby",
"-I", File.expand_path("../..", $LOADED_FEATURES.grep(/bundler\/setup\.rb$/).first),
*(bundler_dir != RbConfig::CONFIG["rubylibdir"] ? ["-I", bundler_dir] : []),
"-I", File.expand_path("../..", __FILE__),
"-e", "require 'spring/application/boot'",
3 => child_socket,
Expand Down

0 comments on commit caa09ef

Please sign in to comment.