In the Gemfile
of my Rails project, I am starting to have auxiliary gems like "ruby-debug19", "perftools.rb", or "irbtools". All of these really have nothing to do with the project, but rather are part of my local development setup. But since I'm using bundler, I cannot load these gems (even though they are installed system-wide) unless I add them to the Gemfile. In my view that is a bit of a code smell.
For example, I would like to be able to require 'irbtools'
in rails console
without adding "irbtools" to my Gemfile.
Is there a way to keep auxiliary gems out of the Gemfile and still be able to load them for debugging, profiling, etc. when I need them?
Actually, you can create a group
in you Gemfile
like:
group :auxiliary do
gem 'irbtools'
end
And then use bundle install --without auxiliary
if you don't want to use irbtools
. Why do you think adding them to Gemfile
is a code smell? And if it possible to do this without adding gems to the Gemfile
it will be many more code smell I think.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With