I have problem accessing image file from Ruby On Rails projects app/assets/images/dir/image.jpg
It's showing nothing on image box in a browser.
Locally on development environment run its shows.
In my code on a local machine, I am using relative path '/assets/dir/'+image.jpg and this working locally ok.
I can open image on 'http://localhost:3000/assets/dir/ih4modxp4i4-jakob-owens.jpg' but online on production nothings showing 'http://xxx.62.xx.127/assets/dir/horuo-9ghiw-vincent-guth.jpg'
What am I doing wrong?


images/part of the path or not?something.js.erb. This way, the path to the image can be resolved with regards to the asset pipeline.jsfile via a ruby template - i.e. write it as a.js.erbfile. (Or alternatively, disable the asset pipeline!)public/folder. These will not be compiled, so can be referenced directly by the filename. However, images placed here will always be accessible (e.g. without logging in) - so don't misuse it. For example, you'll probably already have stuff relating to4xxerror pages in thepublicfolder.