Static assets must be in the / public folder, otherwise you will get a routing error. For a static image in http://localhost:3000/images/Header.png you want to place Header.png in RAILS_ROOT/public/images
When specifying any URL, Rails will check the file existing on the path from the RAILS_ROOT / public directory before trying to map any routes.
For example, when a Rails server receives a request for http://localhost:3000/users/1 , it will try to send the contents of RAILS_ROOT/public/users/1 . If the file does not exist, the route matching procedure is performed.
Brock batsell
source share