Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails deployment not showing images on the production

I am using AWS Opswork for the deployment of my rails app

i am using unicorn + Nginx and I am stuck into this error since 2 days , my application is working fine and i got my css and javascript working after doing rake assets:precompile but i am not able to see any image or fa icon in my application

all my images are stored in app/assets/images

and in the html views i am using it like <img src="/assets/image.jpg">

my images are loading perfectly in the development but not in the production

like image 606
user4965201 Avatar asked Dec 15 '15 09:12

user4965201


1 Answers

I had this issue. I had to recompile my assets.

  1. Remove previously pre-compiled assets by runnning rake assets:clobber
  2. Pre-compile rake assets:precompile
  3. Restart your application / server

Hope this helps

like image 164
mwangi Avatar answered Oct 30 '22 07:10

mwangi