utils: inject Ruby path when running Gems
utils: inject Ruby path when running Gems

Particularly the `bundler` Gem requires the right Ruby binary to be in
the PATH to work correctly if the Ruby binary used to run Homebrew is
overridden via `HOMEBREW_RUBY_PATH` and thus intentionally not prefixed
to the PATH (as that would affect formulae with a Ruby dependency).

The workaround here is to prefix this path only when a Gem is activated
via `Homebrew.install_gem_setup_path!` (currently used in `brew man`,
`brew style`, and `brew tests`).

konqui/brew,Linuxbrew/brew,ilovezfs/brew,hanxue/linuxbrew,tonyg/homebrew,reelsense/brew,vitorgalvao/brew,aw1621107/brew,staticfloat/brew,reitermarkus/brew,reitermarkus/brew,mahori/brew,palxex/brew,sjackman/homebrew,EricFromCanada/brew,aw1621107/brew,mgrimes/brew,gregory-nisbet/brew,jmsundar/brew,muellermartin/dist,DomT4/brew,palxex/brew,sjackman/homebrew,mistydemeo/homebrew,tonyg/homebrew,JCount/brew,Homebrew/brew,Linuxbrew/brew,MikeMcQuaid/brew,DomT4/brew,bfontaine/brew,jmsundar/brew,rwhogg/brew,konqui/brew,JCount/brew,zmwangx/brew,MikeMcQuaid/brew,pseudocody/brew,staticfloat/brew,toonetown/homebrew,pseudocody/brew,zmwangx/brew,ilovezfs/brew,amar-laksh/brew_sudo,mahori/brew,mgrimes/brew,konqui/brew,MikeMcQuaid/brew,reitermarkus/brew,reelsense/brew,pseudocody/brew,AnastasiaSulyagina/brew,EricFromCanada/brew,bfontaine/brew,Homebrew/brew,reelsense/brew,claui/brew,claui/brew,gordonmcshane/homebrew,EricFromCanada/brew,muellermartin/dist,Linuxbrew/brew,nandub/brew,EricFromCanada/brew,amar-laksh/brew_sudo,AnastasiaSulyagina/brew,Linuxbrew/brew,aw1621107/brew,mistydemeo/homebrew,gordonmcshane/homebrew,nandub/brew,hanxue/linuxbrew,Homebrew/brew,ilovezfs/brew,gregory-nisbet/brew,nandub/brew,muellermartin/dist,claui/brew,AnastasiaSulyagina/brew,sjackman/homebrew,maxim-belkin/brew,DomT4/brew,mistydemeo/homebrew,konqui/brew,alyssais/brew,sjackman/homebrew,maxim-belkin/brew,maxim-belkin/brew,mahori/brew,vitorgalvao/brew,toonetown/homebrew,jmsundar/brew,JCount/brew,Homebrew/brew,mahori/brew,palxex/brew,mgrimes/brew,gordonmcshane/homebrew,zmwangx/brew,alyssais/brew,nandub/brew,vitorgalvao/brew,hanxue/linuxbrew,tonyg/homebrew,claui/brew,gregory-nisbet/brew,rwhogg/brew,staticfloat/brew,vitorgalvao/brew,rwhogg/brew,JCount/brew,DomT4/brew,bfontaine/brew,MikeMcQuaid/brew,toonetown/homebrew,amar-laksh/brew_sudo,alyssais/brew,reitermarkus/brew