Homebrew 4.6.4 introduced a breaking change that disabled the possibility of installing formulas/casks from paths.
The official workaround is to create a local tap and move your ruby file there,
which is obnoxious to do manually every time.
brew-install-path automates this by allowing you to install local paths in one command.
brew install nikitabobko/tap/brew-install-path
After installing brew-install-path, you can do the following:
brew install-path ./formula-or-cask.rb
brew ip ./formula-or-cask.rb
Formulas/Casks installed by brew-install-path are no different from other formulas/casks and can be uninstalled as usual by brew uninstall.
Usage: brew install-path [-h|--help] [-v|--version] [--cask|--formula] [OTHER_OPTIONS]... [--] <PATH>...
Options:
-h, --help Print this help and exit
-v, --version Print version and exit
--cask Treat all named arguments as casks
--formula, --formulae Treat all named arguments as formulas
All other options are forwarded to 'brew install'
brew-install-path is written by somebody who "demonstrates their lack of understanding of Homebrew works", use at your own risk.
If you found this script to be useful, keep in mind that your workflow is probably "broken" and you should reevaluate using it. Also, please note that by using this script, you are actively "wasting the limited time" of precious homebrew volunteers.
Thank you for your understanding.