0
我想在我的Ruby on Rails網站上彈出一個圖像。我使用HTML文檔作爲我的主頁,當我輸入此代碼(下面)時,它不會出現。我一直在尋找不同的方式來調用它,但我一直無法在我的網站上生成圖像。對不起,我也是新來的SE,所以如果我需要添加一些東西,請耐心等待。Ruby on Rails HTML代碼中的圖像
我是否缺少需要渲染圖像的gemfile?
<!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>
你應該使用IMAGE_TAG http://apidock.com/rails/ActionView/助手/ AssetTagHelper/image_tag – Joel
嘗試將此圖像放在'public'文件夾中,然後把'ancor.png'放到'src =「' –