all.
I have a Rails app, and when it under development environment, images will display in the page, but if I turn into production mode, all the images will response 404 not found.
Rails version: 3.0.7 Web Server: thin
in config/environments/production.rb change config.serve_static_assets = false to be true. But remember to turn it to off on actual production machine. Thin, unicorn etc. are not fr serving static files. You should use apache or nginx in front of your app server to load balance multiple instances of app server and serve static files.
ALL CREDITS TO user rubish
config/environments/production.rb
changeconfig.serve_static_assets = false
to betrue
. But remember to turn it to off on actual production machine. Thin, unicorn etc. are not fr serving static files. You should use apache or nginx in front of your app server to load balance multiple instances of app server and serve static files. – rubish