在我使用Rails4和ruby2.2的新应用程序中,我设置了脚手架和数据库。将内容放入product.css.scss并创建一个简单的索引页面。当我启动服务器时,样式表显示在firebug中,但不会加载到页面中。这是页面加载时的终端输出。请注意,产品..... css是GOT。
Started GET "/products/" for ::1 at 2015-02-19 19:33:49 +0000
Processing by ProductsController#index as HTML
Product Load (0.2ms) SELECT "products".* FROM "products"
Rendered products/index.html.erb within layouts/application (4.6ms)
Completed 200 OK in 67ms (Views: 66.0ms | ActiveRecord: 0.2ms)
Started GET "/assets/products-4e4513638d9521b9efce9b4a8b4e831a.css?body=1" for ::1 at 2015-02-19 19:33:50 +0000
Started GET "/assets/scaffolds-8303c55245261085d0bbcdc67eb2a91f.css?body=1" for ::1 at 2015-02-19 19:33:50 +0000
Started GET "/assets/jquery-87424c3c19e96d4fb033c10ebe21ec40.js?body=1" for ::1 at 2015-02-19 19:33:50 +0000
Started GET "/assets/jquery_ujs-e27bd20a10d28155845a22d71ef94f2f.js?body=1" for ::1 at 2015-02-19 19:33:50 +0000
Started GET "/assets/turbolinks-da8ddad9c2c5483d4c5c30c1ce325253.js?body=1" for ::1 at 2015-02-19 19:33:50 +0000
Started GET "/assets/products-46c9a194bd0668e67d57241f94473dc8.js?body=1" for ::1 at 2015-02-19 19:33:50 +0000` <title> Depot </title>
这是来自生成的源
<title> Depot </title>
<link rel="stylesheet" media="all" href="/assets/application-0197bf3693ae0b690bfba9f2f2d33f8d.css?body=1" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/assets/products-4e4513638d9521b9efce9b4a8b4e831a.css?body=1" data-turbolinks-track="true">
<link rel="stylesheet" media="all" href="/assets/scaffolds-8303c55245261085d0bbcdc67eb2a91f.css?body=1" data-turbolinks-track="true">
<script src="/assets/jquery-87424c3c19e96d4fb033c10ebe21ec40.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/jquery_ujs-e27bd20a10d28155845a22d71ef94f2f.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/turbolinks-da8ddad9c2c5483d4c5c30c1ce325253.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/products-46c9a194bd0668e67d57241f94473dc8.js?body=1" data-turbolinks-track="true"></script>
<script src="/assets/application-7940349aecc5b83c3832ad0db52d27df.js?body=1" data-turbolinks-track="true"></script>
<meta name="csrf-param" content="authenticity_token">
<meta name="csrf-token" content="r/8eGQf0UO72Jq2ogcLAqkgEFyJH6MjHU/+ayZbr4/k+Zwv0WwNkdZ7aep+p9bmGS6wJSYcdOC33luzQrE5J3g==">
</head>
有人知道为什么样式表不会加载吗?
products-4e4513638d9521b9efce9b4a8b4e831a.css在公共资产中不存在/创建???但是图像和javascript都可以。