Rails production 模式运行后 public/assets 下的静态文件无法访问

ecloud · September 14, 2017 · 1081 hits

已经配置了config/production.rb

config.public_file_server.enabled = true

而且public/assets/下已经 precompile 静态文件了。比如:

但是浏览器访问的时候还是 404 了。

请教下论坛的各位大神,怎么解决问题?

下面是部分 log 文件

ActionController::RoutingError (No route matches [GET] "/assets/application-268e30bfc2d4c7da0598b0a3a7bcb5ca49111f49e3b5a66b7f3b8c89af029812.js"):
actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
[da2f50a9-d1fe-46a4-b4df-4c606ba4dc17] actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.