Skip to main content

Add A Ruby Gem

Global Ruby gems are managed via a list.

Preconditionsโ€‹

  • Ruby and gem are installed.
  • You verified the gem name.

Stepsโ€‹

  1. Add the gem name to:

    This installs as ~/.default-gems.

  2. Apply:

    chezmoi apply

Hook:

Verificationโ€‹

gem list --local | rg '^<gemname> '

Rollback / Undoโ€‹

  1. Remove the gem from home/readonly_dot_default-gems.
  2. Re-apply so the gem is no longer part of the desired list:
chezmoi apply
  1. Uninstall the already-installed gem manually:
gem uninstall <gemname>

The hook installs listed gems only; it does not uninstall gems removed from the list.