Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 我的整个rails应用程序只从一个文件获取css为什么_Ruby On Rails_Css_Sass - Fatal编程技术网

Ruby on rails 我的整个rails应用程序只从一个文件获取css为什么

Ruby on rails 我的整个rails应用程序只从一个文件获取css为什么,ruby-on-rails,css,sass,Ruby On Rails,Css,Sass,我为两个控制器添加了不同的css文件,但我的整个应用程序只从product.css 我为两个控制器添加了不同的css文件,但我的整个应用程序只从product.css 我为两个控制器添加了不同的css文件,但我的整个应用程序只从product.css products.css body { font-size: 11px; font-family: 'Open Sans', sans-serif; color: #4A4A4A ; text-align: cent

我为两个控制器添加了不同的css文件,但我的整个应用程序只从
product.css

我为两个控制器添加了不同的css文件,但我的整个应用程序只从
product.css
我为两个控制器添加了不同的css文件,但我的整个应用程序只从
product.css

products.css

body {
    font-size: 11px;
    font-family: 'Open Sans', sans-serif;
    color: #4A4A4A ;
    text-align: center;
}

.wrap {
    background: #fff;
    margin: 20px auto;
    display: block;
    width: 300px;
    height: 380px;
    padding:20px;
    border-radius: 2px 2px 2px 2px; 
    -webkit-box-shadow: 0 1px 4px 
    rgba(0, 0, 0, 0.3), 0 0 40px 
    rgba(0, 0, 0, 0.1) inset;
    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
    box-shadow: 0 1px 4px 
    rgba(0, 0, 0, 0.3), 0 0 40px 
    rgba(0, 0, 0, 0.1) inset;
    float: left;
    margin-right: 29px;
}

.wrap img {
    width: 100%;
    margin-top: 15px;
}

p{ 
    margin-top: 15px;
    text-align: justify;
}

h1{
    font-size: 20px;
    font-weight: bold;
    margin-top: 5px; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

a{
    text-decoration: none;
    color: #4A4A4A !important;
}

a:hover{
    text-decoration: underline;
    color: #6B6B6B !important ;
}

**好的,如果您使用的是混合了CSS的SCS,我的建议是将product.CSS更改为product.scs,并使用

 @import '/*';
 @import '/**/*'; 
根据您的文件夹结构,如果rails找不到任何文件,则会抛出错误,因为rails没有拾取scss文件


此外,您还可以删除所有资产管道内容,并执行@import'font-awesome'

您的文件夹结构是什么样的?你能解释一下你所说的文件夹结构是什么意思吗?请不要重复同样的问题。相反,编辑您的问题,添加更多细节-它将在列表中上移。请在此问题中显示您的其他css文件以及application.css文件。您如何知道products.css是唯一正在使用的文件?