~I am having some trouble running
brew cask audit tests because Homebrew (at least according to
brew config) keeps using the macOS-provided Ruby for the
rubocop gems et. al., even when force-linking, both with
rbenv and with plain Homebrew
EDIT: After running
rm -rf /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0 and attempting to run brew cask style again, it works. However, this issue has been reported in other threads (here: Cannot install rubocop related gems), so I believe it might be an actual bug.
Original question: Is there any way to force Homebrew to use a user-defined Ruby for its own purposes, so I can know where the gems are going? Also, why does Homebrew use its own 2.3.0 specifically?
brew config output:
ORIGIN: https://github.com/Homebrew/brew HEAD: 8f74ba0197635b6ac7b03ea4eb7297d416fcf91a Last commit: 4 hours ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 7622ef3e0517780171dfdaec762625a3d10ea3e5 Core tap last commit: 28 minutes ago HOMEBREW_PREFIX: /usr/local HOMEBREW_DEV_CMD_RUN: 1 HOMEBREW_NO_ANALYTICS_THIS_RUN: 1 CPU: octa-core 64-bit kabylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.19.0 => /usr/local/bin/git Curl: 7.54.0 => /usr/bin/curl Java: 1.8.0_181 macOS: 10.14-x86_64 CLT: N/A Xcode: 10.0 XQuartz: 2.7.11 => /opt/X11 Your system is ready to brew.