久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='tGpxO'><tr id='tGpxO'><dt id='tGpxO'><q id='tGpxO'><span id='tGpxO'><b id='tGpxO'><form id='tGpxO'><ins id='tGpxO'></ins><ul id='tGpxO'></ul><sub id='tGpxO'></sub></form><legend id='tGpxO'></legend><bdo id='tGpxO'><pre id='tGpxO'><center id='tGpxO'></center></pre></bdo></b><th id='tGpxO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tGpxO'><tfoot id='tGpxO'></tfoot><dl id='tGpxO'><fieldset id='tGpxO'></fieldset></dl></div>

    <small id='tGpxO'></small><noframes id='tGpxO'>

      <bdo id='tGpxO'></bdo><ul id='tGpxO'></ul>
    <legend id='tGpxO'><style id='tGpxO'><dir id='tGpxO'><q id='tGpxO'></q></dir></style></legend>
  • <tfoot id='tGpxO'></tfoot>

        ruby on rails:傳單導軌未加載

        ruby on rails: leaflet-rails not loading(ruby on rails:傳單導軌未加載)

        <i id='xeDcJ'><tr id='xeDcJ'><dt id='xeDcJ'><q id='xeDcJ'><span id='xeDcJ'><b id='xeDcJ'><form id='xeDcJ'><ins id='xeDcJ'></ins><ul id='xeDcJ'></ul><sub id='xeDcJ'></sub></form><legend id='xeDcJ'></legend><bdo id='xeDcJ'><pre id='xeDcJ'><center id='xeDcJ'></center></pre></bdo></b><th id='xeDcJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xeDcJ'><tfoot id='xeDcJ'></tfoot><dl id='xeDcJ'><fieldset id='xeDcJ'></fieldset></dl></div>
          1. <legend id='xeDcJ'><style id='xeDcJ'><dir id='xeDcJ'><q id='xeDcJ'></q></dir></style></legend><tfoot id='xeDcJ'></tfoot>
              <tbody id='xeDcJ'></tbody>
              <bdo id='xeDcJ'></bdo><ul id='xeDcJ'></ul>

              <small id='xeDcJ'></small><noframes id='xeDcJ'>

                • 本文介紹了ruby on rails:傳單導軌未加載的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  使用 RoR 4.1.4

                  Using RoR 4.1.4

                  我正在嘗試使用 leaflet-rails gem.我按照 github 頁面中概述的步驟進行操作,但是當我嘗試加載地圖時,我看到了

                  I am trying to use the leaflet-rails gem. I followed the steps outlined in the github page, but when I try to load the map, I see

                  ReferenceError: L is not defined
                  

                  在瀏覽器控制臺中.這顯然意味著 gem 中的幫助程序正在加載和執行,但它找不到 leaflet.js 文件.

                  in the browser console. This obviously means that the helper from the gem is being loaded and executed but it can't find the leaflet.js file.

                  但是,頁面的 head 部分顯示 /assets/leaflet.js 正在被引用并且它實際上就在那里.

                  However, the head section of the page shows that /assets/leaflet.js is being referenced and it actually IS there.

                  當我查看生成的代碼時:

                  When I look at the generated code:

                      <div id="map"></div>
                      <script>
                      var map = L.map('map')
                      map.setView([-54.0, 6.08], 16)
                      L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
                                attribution: '&copy; <a >OpenStreetMap</a> contributors',
                                maxZoom: 18,
                      subdomains: '',
                      }).addTo(map)
                      </script>
                    </div>
                    <script src="/assets/jquery.js?body=1" data-turbolinks-track="true"></script>
                    <!-- all the other scripts loaded -->
                    <script src="/assets/exif.js?body=1" data-turbolinks-track="true"></script>
                    <script src="/assets/leaflet.js?body=1" data-turbolinks-track="true"></script>
                    <!-- some more scripts -->
                  

                  因此,gem 在地圖 div 的正下方添加了一個腳本,然后,由于 sprockets 機制和所有這些,其他腳本才被加載.對我來說,這看起來很明顯腳本不可能加載leaflet.js,因為它被之后引用!

                  So the gem adds a script right below the map div, and only then, due to the sprockets mechanism and all that, the other scripts are loaded. To me this looks like then obviously the script can't possibly load the leaflet.js as it's being referenced afterwards!

                  那么...我是否誤解了 RoR 如何處理 gems 和 javascripts?它一定在某個時候起作用了……

                  So...am I misunderstanding something re how RoR handles gems and javascripts? It must have been working at some point...

                  這是我的/app/assets/javascript/application.js:

                  Here's my /app/assets/javascript/application.js:

                  //= require jquery
                  //= require jquery.ui.widget
                  
                  // Here I load a whole bunch of javascripts which are related to jquery-fileupload, cut for brevity
                  //= require bootstrap.min
                  //= require bootbox.min 
                  //= require bootstrap-datepicker
                  
                  //= require exif 
                  //= require leaflet
                  
                  //= require turbolinks
                  //= require_tree .
                  

                  推薦答案

                  不知道你是否能解決你的問題.對我來說,我忘記了跑步:

                  Don't know if you were able to solve your issue. For me, I had forgotten to run:

                  rake assets:precompile
                  

                  在部署到生產之前.

                  這篇關于ruby on rails:傳單導軌未加載的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發點擊傳單標記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)
                  Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標記的緯度和經度)

                      <small id='3fv2h'></small><noframes id='3fv2h'>

                            <tbody id='3fv2h'></tbody>

                          <i id='3fv2h'><tr id='3fv2h'><dt id='3fv2h'><q id='3fv2h'><span id='3fv2h'><b id='3fv2h'><form id='3fv2h'><ins id='3fv2h'></ins><ul id='3fv2h'></ul><sub id='3fv2h'></sub></form><legend id='3fv2h'></legend><bdo id='3fv2h'><pre id='3fv2h'><center id='3fv2h'></center></pre></bdo></b><th id='3fv2h'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3fv2h'><tfoot id='3fv2h'></tfoot><dl id='3fv2h'><fieldset id='3fv2h'></fieldset></dl></div>
                        • <tfoot id='3fv2h'></tfoot>
                          <legend id='3fv2h'><style id='3fv2h'><dir id='3fv2h'><q id='3fv2h'></q></dir></style></legend>
                          • <bdo id='3fv2h'></bdo><ul id='3fv2h'></ul>
                          • 主站蜘蛛池模板: 蜜桃av一区二区三区 | 成人av一区二区三区 | 亚洲精品久久久久久一区二区 | 99re视频在线观看 | 毛片在线免费播放 | 日韩精品在线观看一区二区 | 久久精品亚洲欧美日韩久久 | 久久国产精品亚洲 | 国产精品免费在线 | 97视频成人 | 久久久久久久网 | 99精品久久| 九九色九九 | 日韩视频在线免费观看 | 亚洲免费一区 | 免费毛片www com cn | 岛国精品| 一区视频在线播放 | 99国产精品99久久久久久 | 国产探花在线精品一区二区 | 亚洲精品国产a久久久久久 午夜影院网站 | 三级成人在线 | 国产成人叼嘿视频在线观看 | 国产91久久精品一区二区 | 精品美女在线观看视频在线观看 | 婷婷综合在线 | 久久夜色精品国产 | 国产va| 国产精品久久久久久久久久久久 | 亚洲欧美日韩在线 | 户外露出一区二区三区 | 成人免费淫片aa视频免费 | 在线看片网站 | 中文字幕视频在线 | 亚洲精品国产一区 | 中文字幕亚洲一区二区三区 | 精品久久久999 | 高清一区二区 | 亚洲免费毛片 | 成人国产免费观看 | 久久久人成影片一区二区三区 |