diff --git a/Library/Homebrew/utils/gems.rb b/Library/Homebrew/utils/gems.rb index 320a8ba4a5..603bec116d 100644 --- a/Library/Homebrew/utils/gems.rb +++ b/Library/Homebrew/utils/gems.rb @@ -81,7 +81,8 @@ module Homebrew ohai_if_defined "Installing '#{name}' gem" # `document: []` is equivalent to --no-document # `build_args: []` stops ARGV being used as a default - specs = Gem.install name, version, document: [], build_args: [] + # `env_shebang: true` makes shebangs generic to allow switching between system and Portable Ruby + specs = Gem.install name, version, document: [], build_args: [], env_shebang: true end specs += specs.flat_map(&:runtime_dependencies)