我已经将我的应用程序部署到了生产服务器上。但是我觉得它没有在生产模式中运行。我之所以这么说,是因为它发送邮件的依据是config/environments/development.rb中的设置。这是我的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>另外,我正在使用capistrano进行部署。所有卡皮斯特拉诺的东西似乎都正常。我在delpoy.rb里有这一行
set :rails_env, "production"我需要它吗?我可以在服务器上运行什么命令来查看它是否实际在生产模式中运行?
发布于 2013-12-09 20:25:38
来自How to tell if rails is in production?
tail -f log/production.log或者插上这个
<%= "Environment: #{RAILS_ENV}" %>进入视野
https://stackoverflow.com/questions/20479679
复制相似问题