John Bullhuo
John Bullhuo

Reputation: 71

Production-specific routing error

Only in my Production environment am I getting this error:

 ActionController::RoutingError (No route matches [GET] "/img/stupid_ghost_asset.png")

It's not even appearing in my Staging environment.

This asset does not exist in my repository nor are there any references to this path in any of my CSS, HTML, or JS files.

I cleared the cache on Production, but still nothing. I've even removed and re-precompiled my assets, pushing to both Staging and Production. What else can I do to figure out why I'm getting this error?

Upvotes: 0

Views: 364

Answers (1)

ScieCode
ScieCode

Reputation: 1735

@Ryan Bigg does a great job explaining about static_assets on production environment. https://stackoverflow.com/a/7829852/2620080

This is controlled by this setting in config/environment/production.rb in your application:

config.serve_static_assets = false

Upvotes: 1

Related Questions