简体   繁体   中英

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> 

Hope this will help you

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

or

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM