Gmap4rails - cannot find underscore / gmaps not defined

I am following a simple tutorial here: https://github.com/JonKernPA/gmaps

I keep getting the error:

couldn't find file 'underscore'
    (/app/assets/javascripts/application.js:16)

with the following highlighted line:

<%= javascript_include_tag "application", "data-turbolinks-track" => true %>  

I tried following the guidelines published in gmaps not defined in rails 4 + gmaps4rails 2.0.3

and I get the same error with the error with the same highlighted line. When I try to delete a row

<%= javascript_include_tag "application", "data-turbolinks-track" => true %>  

from application.html.erb, I get the error "Gmaps not found"

Any help appreciated, thanks. Github Link: https://github.com/chiefkikio/circus/

+4
source share
4 answers

. gem "underscore-rails", .

+15

, gem 'underscore-rails' (cf https://rubygems.org/gems/underscore-rails), gmaps4rails.

+1

Underscore :

//# sourceMappingURL = underscore-min.map

Chrome underscore-min.map . , .

, underscore-min.map(https://github.com/jashkenas/underscore/blob/master/underscore-min.map) line from underscore.min.js

0

, : application.js . //= require_tree . gmaps. controller_name.js, , Gmaps , .. , , .. ".. ". : js window.load. :

google.maps.event.addDomListener(window, "load", callback)

,

0

All Articles