I am new to Ruby on Rails and am following the Rails Tutorials by Michael Hartl.
According to the book, I had downloaded a set of CSS and placed it in /public/stylesheets/ folder. Also, I had placed a logo.png file in public/images folder. When I request a page from the browser, the logo is not displayed and instead, the Alt text is displayed. Also, I think the CSS is not linked too.
I seemed to have done exactly what the book said. Not sure what the problem is.
Rails 3.2.8, ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
Here is the layout application.html.erb page:
<!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>
</body>
</html>
Rails 3.X has stylesheets in
app/assets/stylesheets, and images inapp/assets/images.The other advice is good too… use the latest version of the tutorial and check out rvm.