My understanding of the new Rails 3.1 pipeline in production mode is as follows: →
- config.action_controller.asset_host =
"https://mybucket.s3.amazonaws.com" - config.assets.compile = false
app/assets checked on repo- bundle exec rake assets: precompile and synchronize with S3 (all assets)
public/assets NOT checked for repo
With all of the above, I thought that Rails would look for all the assets in S3, and I did not need them in the repository. Or at least I don't need pre-compiled assets in public/assets in the repo.
I found this on heroku, if it does not have config.assets.compile = true , it will not contain precompiled assets on S3. And heroku must go through the compilation stage for all assets, but then will call them from S3. Running heroku run rake assets:precompile does not crouch. The production process will compile everything again.
BUT? It makes no sense to me.
It would be wise for me that you do not need to fill repo with images, let your CDN work.
I feel like it's wrong. Am I right or wrong?
Karl
source share