title: Rails asset pipeline - image_path helper only working in development
body: <p>I have a problem with asset preocompilation in Rails (3.2.7). </p>
  
  <p>I am including an favicon like this:</p>
  
  <pre><code>&lt;link rel="icon" type="image/png" href="&lt;%= image_path("favicon.png") %&gt;" /&gt;
  </code></pre>
  
  <p>On development mode I set <code>config.assets.compile = true</code>. There everything works fine, the rendered HTML looks like this:</p>
  
  <pre><code>&lt;link rel="icon" type="image/png" href="/assets/favicon.png" /&gt;
  </code></pre>
  
  <p>But on production, where I set <code>config.assets.compile = false</code>, I get the error</p>
  
  <pre><code>Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError in Home#index
  ...
  favicon.png isn't precompiled
  </code></pre>
  
  <p>I already ran <code>rake assets:precompile</code> and i can clearly see, that the asset is available under <code>public/assets/favicon.png</code>.</p>
  
  <p>I know, that i could set <code>config.assets.compile = true</code> in production, but i don´t want to do that (because of performance reasons). </p>
  
  <p>Has anyone an idea, why my rails app is not able to resolve the correct path to the asset in production? Thanks!</p>
  
  <hr>
  
  <p>Update:
  maybe also useful to know: It happens not only for images, also for other assets.</p>
  
  <p>For example <code>&lt;%= stylesheet_link_tag "screen", :media =&gt; "all" %&gt;</code> also produces the error <code>screen.css isn't precompiled</code> when config.assets.compile is set to false.</p>