我正在尝试使用终端命令git push heroku master
将我的应用程序部署到heroku,但是在资产预编译期间失败,并且我对错误消息的理解不多。
我收到错误:
remote: I, [2019-09-07T14:40:57.856531 #1633] INFO -- : Writing /tmp/build_1e97b201914388013420d438aaf972eb/public/assets/application-6e5c569b523cb8b97f659b2b254c3a9c22a7cbd1d9c4f17afaf18019084c6544.js.gz
remote: rake aborted!
remote: SassC::SyntaxError: Error: Invalid CSS after "...e* bootstrap.*/": expected 1 selector or at-rule, was "*/"
remote: on line 14:76 of app/assets/stylesheets/application.scss
remote: >> t be set or imported *before* bootstrap.*/
remote:
remote: ------------------------------------------^
在application.sccs中,以前是该行:
/* Custom bootstrap variables must be set or imported *before* bootstrap. */
@import "bootstrap";
@import "bootstrap/scss/bootstrap"
但是我已经删除了第一行,现在从第14行开始,我只有:
@import "bootstrap";
@import "bootstrap/scss/bootstrap"
但是问题仍然存在。
简单的错误可能是最难追踪的...
您只是缺少分号...
@import "bootstrap";
@import "bootstrap/scss/bootstrap"; # <= that one
还请注意,您删除的行是css注释(在/* */
之间)