If you want to add gems locally, which should not be committed to the repository:
-
Create a
Gemfile.local
and put it in.gitignore
:eval File.read('Gemfile') gem 'my-other-gem'
-
Set an env var overriding the
Gemfile
location. For example, put it in.env
if you use direnv.BUNDLE_GEMFILE=Gemfile.local