Heroku css not loading after assets:precompile

一曲冷凌霜 提交于 2019-12-31 00:45:14

问题


Heroku suddenly stopped working and gave me this error:

  could not connect to server: Connection refused
  Is the server running on host "127.0.0.1" and accepting
  Precompiling assets failed.

After some research I ran this line:

 running RAILS_ENV=production bundle exec rake assets:precompile

This worked but now when i push an update to heroku the new css doesn't load. This line never used to show before:

Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment

If possible can you also explain why the assets:precompile line solved my original problem?


回答1:


Run this commands:

 bundle exec rake tmp:clear

 bundle exec rake assets:clean RAILS_ENV=production

 bundle exec rake assets:precompile RAILS_ENV=production

Hope this helps!



来源:https://stackoverflow.com/questions/19695809/heroku-css-not-loading-after-assetsprecompile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!