[英]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. 我说这是因为它基于config / environments / development.rb中的设置发送邮件。 Here is my apache config... 这是我的Apache配置...
#/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. 另外,我正在使用capistrano进行部署。 All the capistrano stuff seems to be working OK. 所有capistrano的东西似乎都可以正常工作。 I do have this line in delpoy.rb 我在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 进入视图
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.