文件app/views/layouts/application.html.erb
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<%= csrf_meta_tag %>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
<%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
<!--[if lt IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-->
<%= stylesheet_link_tag 'custom', :media => 'screen' %>
</head>
<body>
<div class="container">
<header>
<%= image_tag("logo.png", :alt => "Sample App", :class => "round") %>
<nav class="round">
<ul>
<li><%= link_to "Home", '#' %></li>
<li><%= link_to "Help", '#' %></li>
<li><%= link_to "Sign in", '#' %></li>
</ul>
</nav>
</header>
<section class="round">
<%= yield %>
</section>
</div>
</body>
</html>
现在按顺序。
功能
stylesheet_link_tag 'blueprint/screen', :media => 'screen'
灵魂回报:
<link href="/stylesheets/blueprint/screen.css" media="screen" rel="stylesheet"type="text/css" />
但她回来了:
<link href="/assets/blueprint/screen.css" media="screen" rel="stylesheet" type="text/css" />
同样的问题:
image_tag("logo.png", :alt => "Sample App", :class => "round")
服务器给出 404 错误。http://savepic.ru/3169970.jpg
我还以为是书上的错别字。但是 api.rubyonrails.org 说这本书不会出错。http://savepic.ru/3168946.jpg
public\stylesheets\blueprint 中的 CSS 框架
public\images\logo.png 中的LOGO
如何解决这个问题?又或者是我的疏忽?