Friday, December 10, 2010

Running rails in production environment

To run a rails app in the production environment, we do the following

rails s -e production


In production environments, all static assets are served by apache/nginx and rails is disabled to serve these assets, since in most cases, we wont have the entire gamut while just switching environments, we need to change config/environments/production.rb.


config.serve_static_assets = false; <-- this should be changed to true

No comments:

Post a Comment