资产管道、指南针字体和 eot?iefix 对字体的调用
我正在尝试使用 Compass 字体混合,其中包含
*.eot?iefix
我的应用程序/资产/字体包含所需的所有字体类型,包括 .eot。
当我尝试运行 asset:precompile 时,任务失败,并显示如下内容: webfont.eot?iefix 未预编译
您知道此问题的可能解决方案吗?
如果我有 config.assets.compile = true,它运行不会出现错误,但据我了解,最好不要在生产中使用它。
I am trying to use a Compass font-face mixin, which contains the inclusion of
*.eot?iefix
My app/assets/fonts contains all the font types needed, including .eot.
When I try to run assets:precompile the task fails saying something like:
webfont.eot?iefix isn't precompiled
Do you know the possible solution for this problem?
It runs with no error in case I have config.assets.compile = true, but as I've understood it's better not to use it on production.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您也可以使用纯 Scss 来做到这一点:
You can do it with pure Scss too:
我刚刚通过一些(支持的)技巧解决了这个问题。
我创建了一个新的 css 文件
font.css.erb
并将@import "font"
放在@font-face
的位置宣言。请注意资产路径的使用以及特殊文件结尾的串联。
I've just solved this problem with a little (supported) hack.
I've created a new css file
font.css.erb
and place@import "font"
in the place of the@font-face
declaration.Note the use of the asset path, and the concatenation of the special file endings.
似乎是一个已知问题 https://github.com/rails/rails/issues/3045
现在使用 config.assets.compile = true 。
Seems to be a known issue https://github.com/rails/rails/issues/3045
Using config.assets.compile = true for now.