编译CSS资源时出错Heroku SASS [英] Error Compiling CSS Asset Heroku SASS

查看:96
本文介绍了编译CSS资源时出错Heroku SASS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这已经困扰了几天,从一个星期以来,我发射到Heroku大概第30次,突然我得到这个错误





我不使用Sass!它不在我的gemfile或其他地方!它工作完美在localhost和所有的答案,我发现在线只是不工作!



这是我的application.css

  / * 
*这是一个将编译成application.css的清单文件,它将包括下面列出的所有文件
*。
*
*此目录中的任何CSS和SCSS文件,lib / assets / stylesheets,vendor / assets / stylesheets,
*或插件的vendor / assets / stylesheets这里使用相对路径引用。
*
*您可以向此文件中添加应用程序范围的样式,它们将显示在
*编译文件的顶部,但通常最好创建一个新文件每个样式范围。
*
* = require_self
* = require_tree。
* /

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

PS:你想知道,我在创建heroku应用程序时使用堆栈雪松,所以它不是



谢谢

解决方案

好了一会儿,我想出来了。



处理这个错误的最简单,不那么快,但最不紧张的方法是通过运行Heroku有错误编译的文件,在我的case base2.css,并逐个复制一行css代码并在此处输入 CSS Validator ,I HIGHLY HIGHLY推荐此,它会告诉你哪些行有错误,哪些行是好的。
此外,它会重写代码中发现的错误,它将组织新的代码给出完美的,即使它可能看起来像只要一本书,它将是正确的代码。
然后,您可以缩小他们给您的代码,将书长码转换为一行。


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

I DONT USE Sass!! It isnt in my gemfile or anywhere else! It works perfectly in localhost and all of the answers i've found online just dont work!

This is my 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

PS: Incase you're wondering, i've used stack cedar when create the heroku app so its not that

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. 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.

这篇关于编译CSS资源时出错Heroku SASS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆