我正在嘗試使用html填充來包含IE特定的樣式表。但是,繼續運行到「ActionView :: Template :: Error(即/ IE9.css未預編譯):」錯誤一旦部署到heroku。它似乎在本地工作。預編譯用於css填充的scss文件
我一直在嘗試資產的不同組合和位置,但到目前爲止沒有任何工作。
我目前的配置如下。
的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 .
*/
application.html.haml
/[if gte IE 9]
= stylesheet_link_tag "ie/IE9", media: "all"
application.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';
在此之後我添加了一個空白index.css.scss文件到「即」文件夾,並從我的production.rb文件中刪除config.assets.precompile。根據鏈接,在application.css.scss中,我添加了「* = require ie」。它在本地工作,但在部署到heroku時仍會失敗並出現相同的錯誤。 – 2013-04-04 00:58:31
你可以發佈你的'application.css.scss'嗎?注意,索引文件應該包含'* = require_tree .'例程。 – 2013-04-04 01:03:16
我已經改變了上述內容以反映當前的設置。 – 2013-04-04 01:04:46