Matt Matt - 7 months ago 33
HTML Question

Ruby on Rails Image in HTML code

I am trying to make an image pop up in my Ruby on Rails website. I am using the HTML doc to be my homepage and when I type in this code (below) it doesn't appear. I have been searching all over for the different way to call it but I haven't been able to generate the image on my site. Sorry I am also new to SE so if I need to add something to this please be patient and kind.

Am I missing a gemfile that I need to render images?



<!DOCTYPE html>
<p>Welcome to <%= @owner.name %>.</p>

<div class="row">
<div class="large-3 columns">
<a href="http://www.DeremaHelp.com" target="_self">
<img src="/home/nitrous/code/Derema_Help/app/assets/images/brands/ancor.png" alt="Ancor" border="0"/>
</a></div>
</div>




Answer

Hope this will help you

<a href="http://www.DeremaHelp.com">
    <img src="/images/ancor.png"/>
</a>

or

<%= image_tag("ancor.png") %>