Automatically precompile assets before pushing to Heroku

后端 未结 5 1363
醉酒成梦
醉酒成梦 2021-02-04 15:15

Is it possible to automatically precompile my assets in a Rails app before pushing out to Heroku? I always forget to do it, so it would be nice if when I typed git push he

5条回答
  •  悲哀的现实
    2021-02-04 15:43

    It sounds like you might not be on Heroku's Cedar Stack? If you're using the asset pipeline (Rails -v >= 3.1), cedar provides three options for compiling assets.

    From the docs:

    If you have not compiled assets locally, we will attempt to run the assets:precompile task during slug compilation.

提交回复
热议问题