Is it possible to skip the asset precompile step for a single git push on Heroku?

后端 未结 4 1827
慢半拍i
慢半拍i 2020-12-28 19:18

Every time I deploy my Rails 3.2 project to Heroku, rake assets:precompile is run:

$ git push heroku master  
...
----> Preparing app for Rai         


        
4条回答
  •  滥情空心
    2020-12-28 20:18

    Just precompile locally with rake assets: precompile, check in the resulting assets that are in public/assets, and push to heroku.

    This will automatically create the manifest-.yml or json file in your public/assets directory; then heroku will detect that and report Detected manifest file, assuming assets were compiled locally.

    Note 1: Some people have a line in development.rb that makes these go to public/dev-assets instead; if so, you need to rename dev-assets to just assets)

    Note 2: Make sure your .gitignore file is not excluding the public/assets directory.

提交回复
热议问题