title: How can I install a gem as if it was specified in a Gemfile?
body: <p>I want to install a gem via <code>gem install</code>, but I need it to resolve with dependencies of the current project.</p>
  
  <p>Basically I want the functionality that bundler gives me when I specify <code>gem 'xyz'</code> in a Gemfile, but I don't want to add that specific gem into the Gemfile.</p>
  
  <p>I tried doing <code>bundle exec gem install ...</code> but it doesn't seem to work.</p>
  
  <p><strong>edit:</strong> The reason why I don't want to add it to the Gemfile is that it might be something like <code>metric_fu</code>, <code>metrical</code>, <code>saikuro</code>, <code>rails_best_practices</code>, etc. Simply gems that are kind of utility use and might only cluttler the project. </p>
  
  <p>I might only want to use them temporarily, or install them, try out, if it doesn't work out the way I want do <code>rvm gemset empty</code> and <code>bundle install</code> again to clean up.</p>