喜欢的东西(在初始化): Sprockets.before_precompile do
# some custom stuff that preps or autogenerates some asset files
# that should then be considered in the asset pipeline as if they were checked in
使用RoR 4.1.4 我正在尝试使用leaflet-rails gem。我跟着GitHub的页面中列出的步骤,但是当我尝试加载地图,我看到 ReferenceError: L is not defined
在浏览器控制台。这显然意味着来自该宝石的助手正在被加载并执行,但它无法找到leaflet.js文件。 但是,页面的头部分显示/assets/leaflet.js正在被引用,它实际上是在那里