From 2ecf50f18f218d3ededa8bc5a520673b361e3d14 Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Sun, 29 Oct 2017 15:31:40 -0500 Subject: [PATCH] Fix #6498: Use Gem to discover the location of bundler. (#6499) Merge pull request 6499 --- lib/jekyll/commands/new.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index e784f24a..197f93c8 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -143,10 +143,13 @@ RUBY def bundle_install(path) Jekyll.logger.info "Running bundle install in #{path.cyan}..." Dir.chdir(path) do - process, output = Jekyll::Utils::Exec.run("bundle", "install") + exe = Gem.bin_path("bundler", "bundle") + process, output = Jekyll::Utils::Exec.run("ruby", exe, "install") + output.to_s.each_line do |line| Jekyll.logger.info("Bundler:".green, line.strip) unless line.to_s.empty? end + raise SystemExit unless process.success? end end