Search code examples
ruby-on-railscapistranoproduction-environment

Image_path in production


I have a problem with an image displaying in production. I use Capsitrano to deploy and precompile assets in production. But as strange as it seems there is one image that does not display. This is the code in slim :

#homepage
  =image_tag('logo.png', class: 'logo')

when I inspect the element I see that the source of the image is wrong. The inspected code is :

<img class="logo" src="/images/logo.png">

When I check the server in public/assets folder, the correct filename should be :

logo-83252a43b7fab804408f6479a0c9cef69bd54a2d86ddd7649544f76ea950b418-c82766b8c4ae4ed44968298685dffbdfa6d8d36f6bcfc2b539b1a4ab84ba1ff9.png

This is the only image that does this. Does anybody know where this could be coming from ?


Solution

  • Ok I solved my issue by creating a logo folder with my logo inside instead of the asset root path, then I deleted all the logo files in development and prodcution and then deploying it to the server with capistano.