title: How to handle gem dependencies that depend on the configuration?
body: <p>I'm currently building an internal gem that will abstract some functionality regarding background processing libraries. The objective of this gem is to remove some duplicated code, accross several rails projecs, and make it trivial to change library.</p>
  
  <p>I want to make it possible for the user to configure what library to use (resque, sidekiq, delayed job...) in an initializer. The problem is that the adapter gem should handle all the dependencies.</p>
  
  <p>My question is, what is the best practice here? I only see two options:</p>
  
  <ul>
  <li><p>Include all supported libraries as dependencies on the adapter gem. (Will install unnecessary software on the server.)</p></li>
  <li><p>Don't include any dependency and instruct the user to include certain dependencies on their gemfile according to the active configuration. (Duplicates code and may lead to human errors.)</p></li>
  </ul>
  
  <p>What option would you consider as a best practice? Is there any other option that I'm missing?</p>