Note that there are some explanatory texts on larger screens.

plurals
  1. PORails tutorial - CSS and Image not being included
    primarykey
    data
    text
    <p>I am new to Ruby on Rails and am following the Rails Tutorials by Michael Hartl. </p> <p>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.</p> <p>I seemed to have done exactly what the book said. Not sure what the problem is.</p> <p>Rails 3.2.8, ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]</p> <p>Here is the layout application.html.erb page:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;%= title %&gt;&lt;/title&gt; &lt;%= csrf_meta_tag %&gt; &lt;!--[if lt IE 9]&gt; &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; &lt;%= stylesheet_link_tag 'blueprint/screen', :media =&gt; 'screen' %&gt; &lt;%= stylesheet_link_tag 'blueprint/print', :media =&gt; 'print' %&gt; &lt;!--[if lt IE 8]&gt;&lt;%= stylesheet_link_tag 'blueprint/ie' %&gt;&lt;![endif]--&gt; &lt;%= stylesheet_link_tag 'custom', :media =&gt; 'screen' %&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;header&gt; &lt;%= image_tag("logo.png", :alt=&gt;"Sample App", :class =&gt; "round") %&gt; &lt;nav class="round"&gt; &lt;ul&gt; &lt;li&gt;&lt;%= link_to "Home", '#' %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to "Help", '#' %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= link_to "Sign in", '#' %&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/nav&gt; &lt;/header&gt; &lt;section class="round"&gt; &lt;%= yield %&gt; &lt;/section&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload