0

在将 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;
  }
}
*/*/*/
4

1 回答 1

0

*/*/*/从两个文件的底部删除,问题就消失了。我不知道它是从哪里来的,我认为 Rails 出于某种原因把它放在那里。

于 2013-06-28T20:35:26.303 回答