I have a problem with asset precompilation in Rails (3.2.7).
I turn on the following icon:
<link rel="icon" type="image/png" href="<%= image_path("favicon.png") %>" />
In development mode, I set config.assets.compile = true . Everything works fine there, the displayed HTML looks like this:
<link rel="icon" type="image/png" href="/assets/favicon.png" />
But when creating, where I set config.assets.compile = false , I get an error
Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError in Home
I have already done rake assets:precompile , and I clearly see that the asset is available under public/assets/favicon.png .
I know that I could set config.assets.compile = true to production, but I don't want to do this (due to performance reasons).
Does anyone have an idea why my rails application is not able to resolve the correct path to an asset in production? Thanks!
Update: it may also be useful to know: this happens not only for images, but also for other assets.
For example, <%= stylesheet_link_tag "screen", :media => "all" %> screen.css isn't precompiled <%= stylesheet_link_tag "screen", :media => "all" %> also generates a screen.css isn't precompiled when config.assets.compile is set to false.