How to 开发者_Python百科set Rails application to Production mode? I'm using capistrano
On my server, doing a rails console shows its in development mode (puts RAILS_ENV)
It really depends on the software you're using to serve your production site. For example, Passenger sets the environment to production by default.
You should investigate the configuration for your production application server.
Make sure you include
ENV['RAILS_ENV'] ||= 'production'
in your environment.rb
file.
精彩评论