Leaflet Marker not found production env

I got a problem with leaflet.

Everything is working fine in development, but in production, my app isn’t able to locate the marker-icon.png and marker-shadow.png images.

It is looking for the path assets/station/images/marker-icon.png

Leaflet js is including like this in my html.erb file

<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.css" />

If someone can help!

15 thoughts on “Leaflet Marker not found production env”

Leave a Comment