rails 3.1 deployment on heroku .css isn't precompiled error

前端 未结 2 1753
[愿得一人]
[愿得一人] 2021-01-30 09:25

Update

I got this error because I had a public.css and public.js file that was not compiled with the rest of the .css and .js files. The solution was to

2条回答
  •  情深已故
    2021-01-30 09:53

    Actually, you need to run precompilation for your production environment:

    • Run RAILS_ENV=production bundle exec rake assets:precompile on local
    • Commit and deploy to Heroku

    More broadly, the Heroku docs describe three options for asset compilation for Rails 3.1+ on Cedar:

    1. Compile locally (covered in this answer)
    2. Compile during slug compilation
    3. Compile during runtime

提交回复
热议问题