TL;DR: An extension to Homebrew allows you to install gems globally on your machine, thus
brew gem install jekyll. Install
brew install brew-gem to use.
I discovered a project called
brew-gem which simplifies the gem install process for gems which are system-wide. It installs the gem and its dependencies in an isolated directory and creates an executable stub in
/usr/local/bin. This means you can
brew gem install jekyll and have Jekyll and all its dependencies installed without rvm/rbenv or any other manager! No
sudo needed, either.
Apple bundles Ruby on its Macs, but Homebrew also supplies Ruby so you can pass the flag
--homebrew-ruby to use Homebrew’s Ruby (i.e. from
brew install ruby) or pass
--system-ruby to use the system Ruby version. By default,
brew gem uses the Homebrew Ruby version if it’s installed.
Next time you need a utility written as a Ruby gem, try
brew gem install!