Anyone know of a simple way to prevent broken images hitting Rails in development?
Sometimes I need to load the production database to debug a specific problem, and the broken images add noise to the logs and slows down Rails.
I'm using pow and am proxying https requests through nginx (on Mac OS X Lion).
[Update]
After upgrading to rails 3.1.3 and adding config.serve_static_assets = false
to development.rb
, the problem still exists.
Here's an example from the logs:
Started GET "/system/template_pics/images/000/000/043/original-254f3340aa9285267db373d8f479144e-1327358518/home6.jpeg" for 127.0.0.1 at Mon Feb 27 14:42:34 +1100 2012
ActionController::RoutingError (No route matches [GET] "/system/template_pics/images/000/000/043/original-254f3340aa9285267db373d8f479144e-1327358518/home6.jpeg"):
Set rails to not serve static assets in
config/development.rb
:Nginx should be setup to serve static assets itself, and any that don't exist won't be server by Rails.