簡體   English   中英

ActionController :: RoutingError(沒有路由與[GET]“ / assets / underscore-min.map”匹配)

[英]ActionController::RoutingError (No route matches [GET] “/assets/underscore-min.map”)

每次我在Rails 5應用程序中刷新頁面時,都會遇到此煩人的錯誤。 我需要underscore.js用於gmaps4rails。 該underscore.js文件位於vendor / javascript / underscore.js,就像本教程說的那樣( Gmaps4Rails Github repo )。

有沒有人有解決或抑制它的好方法?

為了解決這個問題,我做到了:

1)將underscore-min.map的代碼( 鏈接位於此處 )復制到文件中,我將其重命名為underscore-min.map並將其放入資產管道(資產/ javascript)

2)在underscore-min.map中,將underscore-min.js替換為underscore.js

3)在underscore.js ,取消注釋最后一行( sourceMappingURL=underscore-min.map

它對我有用。 我希望它也會對您有幫助。

您應該添加.map文件,或刪除JS中調用該文件的行。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM