I am using rbenv to manage my gems, locally in my projects but also globally, on a Linux box.
When I bump my global ruby version (set in ~/.rbenv/version
), I always forget to install some of my utility gems, that I need for development mainly.
Examples are rubocop for linting, minitest for some scripts I have scattered in my files, etc.
Using my package manager is not a really flexible solution (not so up-to-date, many gems are not packaged etc).
How should I proceed to keep a list of these gems I want to always have globally accessible, whatever the project I am currently working on? Should I have a Gemfile and a Gemfile.lock in my home directory? How could I hide them then (.Gemfile/.Gemfile.lock)?
So that once I change the global ruby version, then a
$ gem install bundler
$ bundle
and I have everything up and running?
In this case would I have to prepend every command with bundle exec
?
Is there a better way to manage this problem that I am not aware of?