简体   繁体   English

编译CSS资产Heroku SASS时出错

[英]Error Compiling CSS Asset Heroku SASS

This has been bothering me for days now, ever since a week ago I launched to Heroku for probably the 30th time and all of a sudden I get this error 自从一周前我向Heroku发射了30次以来,这已经困扰了我好几天了,突然间我收到了这个错误

I DONT USE Sass!! 我不使用萨斯! It isnt in my gemfile or anywhere else! 它不在我的gemfile或其他任何地方! It works perfectly in localhost and all of the answers i've found online just dont work! 它在localhost中可以完美运行,我在网上找到的所有答案都行不通!

This is my application.css 这是我的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 .
 */

Does anyone have any idea WHY heroku is giving me this annoying error 有谁知道为什么heroku给我这个烦人的错误

PS: Incase you're wondering, i've used stack cedar when create the heroku app so its not that PS:如果您想知道,我在创建heroku应用程序时使用过堆栈雪松,所以它不是那样

Thank You 谢谢

Ok so after a while, I figured it out! 好吧,过了一会儿,我想通了!

The simplest, not-so-fastest but least stressful way of working this error out is by going on the file which Heroku is having errors compiling, in my case base2.css, and copy one by one each line of css code and input it in here CSS Validator , I HIGHLY HIGHLY Recommend this, it'll tell you which lines have errors and which lines are okay. 解决此错误的最简单,并非最快但最省力的方法是继续处理Heroku在编译时出错的文件(在我的情况下为base2.css),并逐行复制一行CSS代码并输入在此处CSS Validator中 ,我强烈建议这样做,它会告诉您哪些行有错误,哪些行可以。 Furthermore, it'll re-write the code where it found the errors, it'll organise the new code given perfectly and even though it may seem like its as long as a book, it'll be the right code. 此外,它将在发现错误的地方重新编写代码,将完美地组织给出的新代码,即使看起来像一本书一样,它也将是正确的代码。 You can then Minify the code they give you to turn the book long code into one line. 然后,您可以缩小他们给您的代码,以将整本书的代码变成一行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM