Bundler users define dependencies for Ruby applications in a Gemfile
and install those dependencies by running
Homebrew users on macOS can define system dependencies for their projects
# Brewfile brew "openssl" # a comment tap "homebrew/dupes"
Note that Homebrew will treat lines that start with
# as comments. To install
a package, use
brew, and to tap a repository, use
tap. So this:
brew "openssl" # a comment tap "homebrew/dupes"
is equivalent as these commands:
brew install openssl brew tap homebrew/dupes
I can think of a few places where a
Brewfile would be welcome:
- In dotfiles, either yours or your company’s.
- A setup script for your app (
bundle install && brew bundle)
- A setup script for a new machine. I often forget to install one of them (like rbenv-gem-rehash).
It’s a neat encapsulation for non-programming-language dependencies like