我想将我的 application.css 文件更改为 sass 文件并使用 @import 拉取所有必要的文件。然后我想将 application.css.sass @import 到页面特定的 sass 文件中。这一切在开发中都运行良好,但是当我将它推送到 heroku 上的生产环境时,我得到了这个错误:
Error compiling CSS asset
Sass::SyntaxError: File to import not found or unreadable: application
应用程序.css.sass:
@import "reset"
@import "typography"
@import "buttons"
@import "junk"
$yellow: #f0f090
$orange: #f89818
$blue1: #184898
$blue2: #4888c8
body
background: ...
...
/* all the rest of the app-wide styling */
uniquePage.css.sass:
@import "application"
/*page specific styling*/
然后在需要与 application.css 不同的东西的页面上,我调用
!!! 5
%html
%header
= stylesheet_link_tag "uniquePage"