I just updated my application on Heroku from Rails 3.0 to 3.1, and I'm trying to do the pipeline work. The main problem is that I can read the following lines from heroku log for each asset:
2011-09-03T16:35:28+00:00 app[web.1]: cache: [GET /assets/border-a3c571a354b9381740db48aeebfaa63a.jpg] miss
If I understand the pipeline correctly, this should not be "skipped" for every request that I make from the browser, but it needs to be found in the cache.
When reading Heroku docs, you can find this explanation:
Rails 3.1 provides an assets:precompile rake task to allow the compilation penalty to be paid up front rather than each time the asset is requested. If this task exists in your app we will execute it when you push new code.
But how should this asset: precompilation task be? I tried to build a project with 3.1 rails from scratch to try to figure out, but there is no such problem in a bare project. Or am I missing something? How can I make the assets found in the cache? Perhaps this is just a configuration issue.
These are the parameters of my configuration file:
config.serve_static_assets = false config.assets.compress = true config.assets.compile = true
My application.rb has the following line:
config.assets.enabled = true
Many thanks for your help!
source share