[英]ActionController::RoutingError (No route matches [GET] "/assets/images
[英]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.