简体   繁体   中英

Rails passenger server not running in production mode

I have deployed my app to a production server. However I thing its not running in production mode. I say this because its sending mail based on settings in config/environments/development.rb. Here is my apache config...

#/etc/apache2/sites-available/default
<VirtualHost *:80>
   ServerName nso.server.com
   # !!! Be sure to point DocumentRoot to 'public'!
   DocumentRoot /home/name/nso/current/public
   RailsEnv production
   <Directory /home/name/nso/current/public>
      # This relaxes Apache security settings.
      AllowOverride all
      # MultiViews must be turned off.
      Options -MultiViews
   </Directory>
</VirtualHost>

Additonally I am using capistrano to deploy. All the capistrano stuff seems to be working OK. I do have this line in delpoy.rb

set :rails_env, "production"

Do I need it? What command can I run over on my server to see if its actually running in production mode?

from How to tell if rails is in production?

tail -f log/production.log

or plug this

<%= "Environment: #{RAILS_ENV}" %>

into a view

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM