简体   繁体   中英

Why isn't image_tag rendering my image in Rails 5?

I'm using Rails 5. I ahve the following image path

app/assets/images/loading_spinner.gif

I want to display this image on my page using the image_tag but neither

<% image_tag("images/loading_spinner.gif") %>

nor

<% image_tag("loading_spinner.gif") %>

displays any image tag on my page in my development environment. How do I fix this? I have tried restarting my server.

您错过了平等:

<%= image_tag("loading_spinner.gif") %>

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