Problem
I ran into an issue where homebrew ruby is not linked into the location brew-gem expects which breaks the resulting bin stubs installed by brew-gem.
Solution
Instead of hard coding a path in the homebrew prefix, query the ruby brew formula for its bin path. This fixes situations where homebrew ruby is desired but the ruby formula is not linked to the homebrew prefix path.
Problem I ran into an issue where homebrew ruby is not linked into the location brew-gem expects which breaks the resulting bin stubs installed by brew-gem.
Solution Instead of hard coding a path in the homebrew prefix, query the ruby brew formula for its bin path. This fixes situations where homebrew ruby is desired but the ruby formula is not linked to the homebrew prefix path.