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
如果可能,您还可以解释为什么资产:预编译行解决了我原来的问题吗?
答案 0 :(得分:10)
运行以下命令:
bundle exec rake tmp:clear
bundle exec rake assets:clean RAILS_ENV=production
bundle exec rake assets:precompile RAILS_ENV=production
希望这有帮助!