Я работаю над моим первым приложением на Rails и не могу получить файл изображения (logo.png) для отображения в браузере на локальном хосте: 3000 / pages / home page.Изображение хранится в файле public / images / logo.png в моем приложении Rails.Любая идея, почему это может не показывать?
Вот код:
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/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>
</div>
</body>
</html>
Добавлен источник в контейнере в:
<div class="container">
<header>
<img alt="Sample App" class="round" src="/images/logo.png" />
<nav class="round">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Help</a></li>
<li><a href="#">Sign in</a></li>
</ul>
</nav>
</header>
<section class="round">
<h1>Sample App</h1>
<p>
This is the home page for the
<a href="http://railstutorial.org">Ruby on Rails Tutorial</a>
sample application.
</p>
<a href="#" class="signup_button round">Sign up now!</a>
</section>
</div>
</div>