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

前端 未结 2 1738
[愿得一人]
[愿得一人] 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:36
    • Run bundle exec rake assets:precompile on your local code
    • Commit the changes and deploy to heroku

    If this is your first time deploying your app to heroku, you may experience more errors after this is resolved. Let me know what happens.

    0 讨论(0)
  • 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
    0 讨论(0)
提交回复
热议问题