开发环境下正常
Sent file public/plans/1523708711 (1.3ms)
到产品环境下就报错
ActionController::MissingFile (Cannot read file public/plans/1524803824):
可能和这个地方有关。。还是必须用 NGINX 之类的设置服务目录。。。(下载文件这个功能用的少。我不需要优化啊?)
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX