I have the file "test.gif" in the "/images". In the view, I am using the following command to view it
<%= image_tag 'test.gif' %>
which renders
<img src="/images/test.gif" alt="Test">
But the image is not displayed. Going to "src" address, I get the error message:
No route matches [GET] "/images/test.gif"
How to solve this problem?
Edit:
My route.rb
:
Rails.application.routes.draw do
resources :products
end