0

在 rake 资产期间的 rails 4 中:生产模式下的预编译我收到以下错误。我正在运行:rake assets:precompile RAILS_ENV=production

错误 : 在此处输入图像描述

在 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 social-share-button
 *= require jquery.tagsinput
 *= require_tree .
 *= require_self
*/


.blog_post{
    margin-left: 5%;
    width: 75%;
}

.blog_component{
    margin-top: 2%;
}

.entry-title{ 

}
.post_title{

    color: #000000;
    font-family: cursivefont;
    font-size: 52px;
    height: 119%;
    line-height: 155%;
    margin-left: 20%;
    position: relative;
    text-align: center;
    width: 60%;
}

.left_content{
    width: 50%;
    margin-left: 10%;
    font-family: roboto_normal;
    /*margin-top: 5%;*/
    float:left;
}

.right_content{
     border: 1px solid;
    float: right;
    margin-right: 10%;
    padding: 2%;
    width: 20%;
    /*font-family: roboto_normal;*/

}

.right_content > .recent_post {
    /* font-family: roboto_normal;
    font-size: 195%;
    font-weight: bold;*/
    font-family: roboto_normal;
    font-size: 190%;
    font-weight: bold;
    padding: 0 8% 8%;
    text-align: center;
    text-transform: uppercase;
}
.footer_section{
    float: left;
    width: 70%;
}

@font-face
{
font-family: cursivefont;
src: url(Antonio-Bold.ttf);
}

@font-face{
    font-family: roboto_normal;
    src: url(RobotoCondensed-Light.ttf);
}

*::selection {
  background: #cc0000;
  color: #ffffff;
}
*::-moz-selection {

  background: #000000;
  color: #ffff00;
}
*::-webkit-selection {

  background: #cc0000;
  color: #ffffff;
}


.comment-section{

    margin-left: 15%;
}

.complete_comment{
    background-color: #F8F8F8;
    border: 1px dashed;
    margin: 2%;
    padding: 3%;
}
.user-comment{
    font-family: roboto_normal;
    margin: 30px 8px 8px;
    padding: 1px;
    width: 80%;
}

.commenter {

    font-weight: bold;
    font-size: 18px;
    margin-left: 2%;
    text-decoration: underline;
    text-transform: uppercase;
}


.comment{
    margin-left: 5%;
    font-size: 16px;
}

.test{
    padding: 10%;

}

#error{
    padding: 10%;
}
4

2 回答 2

0

解决此类 css 问题的最佳方法。在此处验证您的 css 文件,它将列出所有语法错误。

http://jigsaw.w3.org/css-validator/validator

它解决了我的问题,缺少语法。

于 2014-03-07T17:22:20.370 回答
0

尝试rake assets:clean,然后再次尝试预编译。你想把它推到哪里?

于 2014-03-07T16:45:29.010 回答