heroku-deflater icon indicating copy to clipboard operation
heroku-deflater copied to clipboard

No such middleware to insert before: ActionDispatch::Static

Open dankmitchell opened this issue 7 years ago • 1 comments

Deploying to heroku in prod can me this error No such middleware to insert before: ActionDispatch::Static so removed this gem and the deploy was successful.

ruby '2.4.0'
gem 'rails', '5.0.2'

dankmitchell avatar Mar 14 '17 18:03 dankmitchell

As the message says, the ActionDispatch::Static middleware must be missing in your app.

That middleware is included unless config.public_file_server.enabled is false. That config value is calculated this way, so you may want to set a configuration variable named RAILS_SERVE_STATIC_FILES to true.

raul avatar Aug 14 '18 13:08 raul