如何解决 Sprockets::DoubleLinkError application.css

kev*_*kev 9 ruby-on-rails heroku sprockets

我在推送到 heroku 存储库时遇到此错误

remote:        rake aborted!
remote:        Sprockets::DoubleLinkError: Multiple files with the same output path cannot be linked ("style.css")
remote:        In "/tmp/build_f430cee0cae4a9543fac20926137c7cc/app/assets/config/manifest.js" these files were linked:
remote:          - /tmp/build_f430cee0cae4a9543fac20926137c7cc/app/assets/stylesheets/style.css
remote:          - /tmp/build_f430cee0cae4a9543fac20926137c7cc/app/assets/stylesheets/style.scss
Run Code Online (Sandbox Code Playgroud)

我已经尝试过这些建议:

  1. 我删除了 .css 文件并保留了 .scss (据我所知没有重复项)
  2. 清除临时目录heroku run rake tmp:clear
  3. 重置回购协议heroku repo:reset -a <app name>
  4. heroku repo:purge_cache -a <app name>

但当我推送到 Heroku 远程时,我仍然不断收到错误

use*_*745 7

对我来说,发生这种情况只是因为我有两个样式表,而我本应该只有一个. 就我而言,我有

myapp/app/assets/stylesheets.application.css
Run Code Online (Sandbox Code Playgroud)

myapp/app/assets/stylesheets.application.css.scss
Run Code Online (Sandbox Code Playgroud)

我应该只吃其中之一

我删除了application.css,问题就消失了