October 9, 2012
Run rails server as production
Short note
- rake assets:precompile
- config.serve_static_assets = true # on production.rb
- rails s -e production
That's all.
config.serve_static_assets
When you run rake middleware
you'll see use ActionDispatch::Static
in the development mode but not in production mode.
In normal case, you should not set that to true
unless for trying production mode on local machine. As the comment on the source code suggested:
Disable Rails's static asset server (Apache or nginx will already do this)