ActionController::RoutingError(没有路由匹配 [GET] "/serviceworker.js"):

ActionController::RoutingError (No route matches [GET] "/serviceworker.js"):

已安装 Rails 6.0.3。 运行 rails new [app],启动服务器,加载主页,服务器日志显示此路由错误。有任何想法吗?这是我还没有接触过的路线文件。

Rails.application.routes.draw do
  # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end

如果要使用rails中的service-worker,请参考如下 https://github.com/rossta/serviceworker-rails

进入 Chrome 的 Dev Tools > Application > Clear Storage 解决了我的问题。