title: Rails asset:precompile on dev machine: How to handle assets group?
body: <p>Since my production machine is somewhat limited (raspberry pi), I want to install as few gems as possible in my production machine. In order to reduce the dependencies, I want to do the precompiling of my assets on my dev machine and deploy them to production. So I don't have to do the precompilition on my production machine and don't need all the gems which are required by the asset pipeline.</p>
  
  <p>So I've moved all gems in the Gemfile to the assets group and changed my config/application.rb:</p>
  
  <pre><code>Bundler.require *Rails.groups(:assets =&gt; %w(development test))
  </code></pre>
  
  <p>In development and test environment everything works fine.</p>
  
  <p>But if I want to do the precompilation on my dev machine via ...</p>
  
  <pre><code>RAILS_ENV='production' bundle exec rake assets:precompile
  </code></pre>
  
  <p>... it breaks due the gems from the assets group are missing.</p>
  
  <p>But I can't simply add the assets group to production environment, since that would require to install all the assets gems in my production environment (what I don't want to do).</p>
  
  <p>Does someone have an idea how to solve that?</p>