我正在尝试使用 html shim 来包含 IE 特定的样式表。但是,一旦部署到heroku,就会一直遇到“ActionView::Template::Error(ie/IE9.css 未预编译):”错误。它似乎在本地工作。
我一直在为资产尝试不同的组合和位置,但到目前为止没有任何效果。
我当前的配置如下。
IE 特定文件位于:
app/assets/stylesheets/ie/index.css.scss
app/assets/stylesheets/ie/IE9.css.scss
app/assets/stylesheets/ie/IE8.css.scss
app/assets/stylesheets/ie/IE7.css.scss
app/assets/stylesheets/ie/IE6.css.scss
index.css.scss
/*
*= require_tree .
*/
应用程序.html.haml
/[if gte IE 9]
= stylesheet_link_tag "ie/IE9", media: "all"
应用程序.css.scss
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require bootstrap
*= require baseline
*= require base10creations/gallery_required
*= require ie
*= require_self
*/
@import 'baseline.css.scss';
@import 'rem.css.scss';
@import 'common.css.scss';
@import 'admin.css.scss';
@import 'layout.css.scss';
@import 'pages.css.scss';
@import 'components.css.scss';
@import 'forms.css.scss';
@import 'override.css.scss';