title: Ruby on Rails - Images not displaying
body: <p>I am following a tutorial to the dot, and my images are just not displaying.</p>
  
  <p>The images are housed in the app/assets/images folder, with the .jpg extension.</p>
  
  <p>The relevant code is:</p>
  
  <p>index.html.erb</p>
  
  <pre><code>&lt;% if notice %&gt;
  &lt;aside id="notice"&gt;&lt;%= notice %&gt;&lt;/aside&gt;
  &lt;% end %&gt;
  
  &lt;h1&gt;Products&lt;/h1&gt;
    &lt;table&gt;
      &lt;tfoot&gt;
        &lt;tr&gt;
          &lt;td colspan="3"&gt;
            &lt;%= link_to 'New product', new_product_path %&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tfoot&gt;
      &lt;tbody&gt;
        &lt;% @products.each do |product| %&gt;
        &lt;tr class="&lt;%= cycle('list_line_odd', 'list_line_even') %&gt;"&gt;
          &lt;td class="image"&gt;
            &lt;%= image_tag image_url(product.image_url, class: 'list_image') %&gt;
  
          &lt;/td&gt;
          &lt;td class="description"&gt;
            &lt;h1&gt;&lt;%= product.title %&gt;&lt;/h1&gt;
            &lt;p&gt;
              &lt;%= truncate(strip_tags(product.description), length: 80) %&gt;
            &lt;/p&gt;
          &lt;/td&gt;
          &lt;td class="actions"&gt;
            &lt;ul&gt;
              &lt;li&gt;&lt;%= link_to 'Show', product %&gt;&lt;/li&gt;
              &lt;li&gt;&lt;%= link_to 'Edit', edit_product_path(product) %&gt;&lt;/li&gt;
              &lt;li&gt;
                &lt;%= link_to 'Destroy', product, method: :delete, data: { confirm: 'Are you sure?' } %&gt;
              &lt;/li&gt;
            &lt;/ul&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;% end %&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
      &lt;%= image_tag 'assets/7apps.jpg' %&gt;
      &lt;%= image_url 'assets/7apps.jpg' %
  </code></pre>
  
  <p>The last two pieces of code was just me experimenting with the different answers I have searched through Stack, and it just isn't working for me at all.
  If it helps:</p>
  
  <p><a href="https://i.stack.imgur.com/rSMLI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rSMLI.png" alt="Image folder"></a></p>
  
  <p><a href="https://i.stack.imgur.com/kFCKV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kFCKV.png" alt="Website"></a></p>
  
  <p><strong>Question</strong>: What exactly have I done wrong where the images are not displaying?</p>
  
  <p><strong>EDIT: Following Julien's help, the image is now appearing for the <code>&lt;%= image_tag 'assets/7apps.jpg' %&gt;</code> code.</strong></p>
  
  <p>Also the code for the loop, which is from Julien:</p>
  
  <pre><code>&lt;td class="image"&gt;
    &lt;%= image_tag product.image_url, class: 'list_image' %&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>Annoyingly, the images for the products table is still not working. I've attached an image.</p>
  
  <p><a href="https://i.stack.imgur.com/iKW0N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iKW0N.png" alt="Website 2"></a></p>
  
  <p>This is the database of the items:</p>
  
  <pre><code>Product.create!(title: 'Seven Mobile Apps in Seven Weeks',
    description:
      %{&lt;p&gt;
        &lt;em&gt;Native Apps, Multiple Platforms&lt;/em&gt;
        Answer the question “Can we build this for ALL the devices?” with a
        resounding YES. This book will help you get there with a real-world
        introduction to seven platforms, whether you’re new to mobile or an
        experienced developer needing to expand your options. Plus, you’ll find
        out which cross-platform solution makes the most sense for your needs.
        &lt;/p&gt;},
    image_url: '7apps.jpg',
    price: 26.00)
  </code></pre>
  
  <p>So I hope that makes sense, for the product.image_url. </p>