0

In my rails application , I uploaded files using carrierwave gem. When I am running my application and using local host as mongodb database its retrieving the image perfectly but when I am trying to use mongodb as remote system like 192.168.X.XX its retriving only half of the url like uploads/files/image.jpg but this image is not displaying in my page. I used image_url to get the path.

Later I hardcoded to attach my ip 192.168.x.xx before that path . Like this http://192.168.x.xx:3000/uploads/files/image.jpg now its displaying the image. How should I display the image without hard coding?

udalmik
  • 7,838
  • 26
  • 40

0 Answers0