When I do heroku rake assets:precompile
this takes almost 15 minutes everytime I do this and it's taking too long.
I am using asset_sync with heroku with S3 but is there a way to speed up this process?
You can precompile assets locally, which will usually be faster. If you are doing this, make sure you have a pre-commit compile git hook so that you don't forget to precompile on deploy (make sure to use RAILS_ENV=production
!)
https://devcenter.heroku.com/articles/rails-asset-pipeline#compiling-assets-locally
If a public/assets/manifest.yml is detected in your app, Heroku will assume you are handling asset compilation yourself and will not attempt to compile your assets. Rails 4 uses a file called public/assets/manifest-.json instead. More recent versuions use public/assets/.sprockets-manifest-.json (note the dot . indicating it may be hidden by default on your machine). On all versions you can generate this file by running $ rake assets:precompile locally and checking the resultant files into Git.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.