Heroku 突然停止工作并给了我这个错误:
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
Precompiling assets failed.
经过一番研究后,我运行了这一行:
running RAILS_ENV=production bundle exec rake assets:precompile
这有效,但现在当我将更新推送到heroku时,新的CSS不会加载。 此行以前从未显示过:
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
如果可能的话,您能否解释一下为什么 asset:precompile 行解决了我原来的问题?
最佳答案
运行此命令:
bundle exec rake tmp:clear
bundle exec rake assets:clean RAILS_ENV=production
bundle exec rake assets:precompile RAILS_ENV=production
希望这有帮助!
关于ruby-on-rails - Heroku css 在 Assets :precompile 之后未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19695809/