在将Rails应用程序部署到VPS的过程中,我遇到了一些导致rake任务中止的CSS错误。我不认为下面的CSS错误是我创建的错误,而是由于文件的加入而引起的,我很难调试它。我的应用程序中有两个css文件(一个是application.css),它们都不是1342行(这是我假设下面的1342指的是)。两个CSS文件都以此
结尾*/*/*/
与错误相关
Invalid CSS after "*/*/*/": expected "{", was ""
** [out :: 198.XXX]
** [out :: 198.XXX] (in /home/brain/apps/dogapp/releases/20130628194843/app/assets/stylesheets/application.css)
** [out :: 198.XXX]
** [out :: 198.XXX] (sass):1342
我的application.css文件充当清单文件,但它也有很多css代码,而另一个css文件中只有css。
注意,如果这很重要,我在本地计算机上运行rake assets:precompile
,因为它似乎是由我从R Bates借用的部署脚本触发的。
你能解释一下这个错误吗?
/*
* 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 bootstrap.min
*= require_tree .
*/
body {
padding-top: 60px;
font-family: Helvetica Neue,Arial,sans-serif;
}
ul {
list-style-type: none;
}
#ommitted code
aside {
textarea {
height: 100px;
margin-bottom: 5px;
}
}
*/*/*/
答案 0 :(得分:0)
我从两个文件的底部删除了*/*/*/
,问题就消失了。我不知道它来自哪里,我认为Rails出于某种原因把它放在那里。