我曾经能够毫无问题地推向Heroku.在做了一些似乎与我的问题无关的更改后,它无法推送到Heroku.在git push heroku上我收到错误: ...remote: ----- Preparing app for Rails asset pipelineremote: Running: rake
... remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: rake aborted! remote: Sprockets::FileNotFound: could not find file: /tmp/build_c657fd7***e8c75a3/app/assets/stylesheets/application.css remote: /tmp/build_790d1e***cab4395/vendor/bundle/ruby/2.2.0/gems/sprockets-3.3.3/lib/sprockets/loader.rb:103:in `load_from_unloaded' remote: /tmp/build_790d1***ab4395/vendor/bundle/ruby/2.2.0/gems/sprockets-3.3.3/lib/sprockets/loader.rb:60:in `block in load' ... remote: ! Precompiling assets failed. remote: ! Push rejected, failed to compile Ruby app remote: ! Push rejected to ***.
application.css确实存在于我的开发环境中,包括:
*= require_self *= require universal *= require bootstrap-datepicker3 *= require menu_header *= require table *= require wice_grid *= require_tree .
有没有人知道可能导致问题的原因以及该怎么办?如果我可以通过重置某些东西来解决它,那么这是一个选项,因为应用程序尚未生效,因此不存在丢失数据的风险.
我联系了Heroku,他们将其描述为一个slug缓存问题.使用 purge_cache清除缓存解决了它.