I have a problem with asset preocompilation in Rails (3.2.7).
I am including an favicon like this:
You must tell Rails which assets are to be precompiled. You do this in config/application.rb
or config/environments/production.rb
with the config.assets.precompile config key.
Rails starts with a default list of assets to precompile, including ["application.js", "application.css"]
, but if you want your own assets to be precompiled too, you have to add them to the list.
For example:
# config/application.rb
module MyApp
class Application < Rails::Application
# other config ...
config.assets.precompile += ["screen.css", "*.png"]
end
end