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.