diff --git a/Library/Homebrew/formula_creator.rb b/Library/Homebrew/formula_creator.rb index 6bd6b0fdde..2abb3fba64 100644 --- a/Library/Homebrew/formula_creator.rb +++ b/Library/Homebrew/formula_creator.rb @@ -216,11 +216,14 @@ module Homebrew <% elsif @mode == :python %> virtualenv_install_with_resources <% elsif @mode == :ruby %> + ENV["BUNDLE_VERSION"] = "system" # Avoid installing Bundler into the keg ENV["GEM_HOME"] = libexec - system "bundle", "install", "-without", "development", "test" + system "bundle", "config", "set", "without", "development", "test" + system "bundle", "install" system "gem", "build", "\#{name}.gemspec" system "gem", "install", "\#{name}-\#{version}.gem" + bin.install libexec/"bin/\#{name}" bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) <% elsif @mode == :rust %>