ruby - Referencing images in a Rails app (Heroku deployment) -
i'm having slight problem referencing images in rails app deployed heroku.
i have image in following path relative app:
app/assets/images/some-image.png
and have referenced in html correctly (as far aware):
<div id="main-nav" class="collapse navbar-collapse"> <img src="/assets/some-image.png" height="67"/><!-- **image source link** --> <ul class="nav navbar-nav" id="mainnav"> <li class="active"><a href="#home" class="scroll-link">home</a></li> <li><a href="#introtext" class="scroll-link">apr</a></li> <li><a href="#initiatives" class="scroll-link">initiatives</a></li> </ul> </div>
yet, displayed:
does have ideas why happening?
you should use image_tag
:
<%= image_tag "some-image.png", height: "67" %>
Comments
Post a Comment