title: How to avoid precompiled assets being served in development mode?
body: <p>I prefer <em>not</em> to concatenate JavaScript files in development mode, but serve them as individual files. So I configured:</p>
  
  <p>development.rb:</p>
  
  <pre><code>config.assets.compress = false
  config.assets.debug = true
  config.assets.compile = true
  </code></pre>
  
  <p>In my /app/assets/javascript directory I have:</p>
  
  <ul>
  <li>reviews.js</li>
  <li>reviews/
  
  <ul>
  <li>foo.js</li>
  <li>bar.js</li>
  </ul></li>
  </ul>
  
  <p>reviews.js:</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require_tree ./reviews
  </code></pre>
  
  <p>I include the JavaScript using <code>&lt;%= javascript_include_tag "reviews" %&gt;</code> in my layout. The generated page correctly references the three scripts individually and <code>reviews.js</code> is essentially empty. So far so good.</p>
  
  <p>Now when I precompile my assets for production using <code>rake assets:precompile</code> the three JavaScript files are concatenated into <code>reviews.js</code>. This is all fine for production but now, <em>in development mode</em>, the concatenated <code>reviews.js</code> is served <strong>in addition</strong> to the two individual files.</p>
  
  <p>Of course, this leads to all kinds of nasty bugs when developing because now, the content of <code>foo.js</code> and <code>bar.js</code> is served twice, one of them in a potentially older version in <code>reviews.js</code>.</p>
  
  <p>How can I make sure Rails doesn't use the precompiled assets in development mode?</p>