【问题标题】:Error Compiling CSS Asset Heroku SASS编译 CSS 资产 Heroku SASS 时出错
【发布时间】:2013-06-23 23:04:45
【问题描述】:

这已经困扰我好几天了,自从一周前我可能第 30 次启动 Heroku,突然间我收到了这个错误

我不使用 Sass!它不在我的 gemfile 或其他任何地方!它在本地主机中完美运行,我在网上找到的所有答案都不起作用!

这是我的 application.css

/*
 * 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_self
 *= require_tree .
 */

有人知道为什么 heroku 给我这个烦人的错误

PS:如果你想知道,我在创建 heroku 应用程序时使用了 stack cedar,所以不是这样

谢谢

【问题讨论】:

  • 只是出于好奇,您的 CSS 文件有效吗?

标签: css heroku compilation sass


【解决方案1】:

好吧,过了一会儿,我想通了!

解决此错误的最简单、不那么快但压力最小的方法是继续执行 Heroku 编译时出错的文件,在我的例子中是 base2.css,然后逐行复制 css 代码并在这里输入CSS Validator,我强烈推荐这个,它会告诉你哪些行有错误,哪些行没问题。 此外,它会在发现错误的地方重新编写代码,它将完美地组织给出的新代码,即使它看起来像一本书一样长,但它会是正确的代码。 然后你可以Minify他们给你的代码,把这本书的长代码变成一行。

【讨论】:

    猜你喜欢
    • 2012-10-12
    • 2015-03-26
    • 1970-01-01
    • 2013-10-08
    • 1970-01-01
    • 2014-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-06
    相关资源
    最近更新 更多