Skip to content Skip to sidebar Skip to footer

Gmaps4rails: Uncaught Referenceerror: Gmaps Is Not Defined

I want to inclued maps into my rails application (I am using Rails 3.2.11 with asset pipeline) via the Gmaps4Rails gem. Following the setup instructions for this gem on https://git

Solution 1:

I figured out that I missed to add the gmaps4rails Javascripts properly to the asset pipeline.

Adding either

//= require_tree .

or

    //= require gmaps4rails/gmaps4rails.bing
    //= require gmaps4rails/gmaps4rails.googlemaps
    //= require gmaps4rails/gmaps4rails.mapquest
    //= require gmaps4rails/gmaps4rails.openlayers
    //= require gmaps4rails/gmaps4rails.base

to application.js would fix the issue.

However, as it seems that I have forgotten to add

//= require_tree .

completely, I have added it just as the last of the includes to my application.js.

Post a Comment for "Gmaps4rails: Uncaught Referenceerror: Gmaps Is Not Defined"