In the local environment I can display the images under app/assets/images, but in the production environment, the images do not load properly. This seems to be because the path is different between the local and the production environment.
Local can display the image with the following code.
<%= image_tag hoge.png ", class:"hoge" %>
In a production environment, you need to use asset_path
.
<%= image_tag asset_path("/images/hoge.png ", class:"hoge") %>
Recommended Posts