dimanche 4 janvier 2015

Heroku production : Gmaps is not defined - works in local


On a simple page, I show a google map with one marker.


In local, everythings works perfectly but, on Heroku I got an error in console :



Uncaught ReferenceError: Gmaps is not defined


this is related to



handler = Gmaps.build('Google'); //and some other stuff


Localy, this is working. But when I deployed this on heroku, it's like it can't load the JS.


this is on the top of my file



<script src="//maps.google.com/maps/api/js?v=3.13&amp;sensor=false&amp;libraries=geometry"type="text/javascript"></script>
<script src='//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js'type='text/javascript'></script>
<script src='//google-maps-utility-library-v3.googlecode.com/svn/trunk/richmarker/src/richmarker-compiled.js' type='text/javascript'></script>


and the application.js



//= require underscore
//= require gmaps/google


I'ts probably a simple error, maybe related to assets precompiled, but I'm not really an expert in this area





Aucun commentaire:

Enregistrer un commentaire