【发布时间】:2011-06-22 23:17:37
【问题描述】:
这是 Rails 3.0.3。
我的部署是带有 Phusion Passenger 的 Apache 2.0。我的 httpd.conf 块如下所示:
<VirtualHost *:80>
ServerName www.mycarparts.co
DocumentRoot /projects/mcp5/public
<Directory /projects/mcp5/public>
AllowOverride all
Options -MultiViews
Allow from all
</Directory>
RailsEnv staging
</VirtualHost>
“生产”也没有在我的配置目录中指定。一个 grep -i -r 产生这个:
config/application.rb:# 你限制在 :test、:development 或 :production。
config/database.yml:# 不要将此数据库设置为与开发或生产相同。
配置/database.yml:生产:
config/database.yml:数据库:mcp_production
config/database.yml:数据库:mcp_production
config/environments/production.rb: # 生产环境适用于完成的“实时”应用程序。
config/environments/production.rb: # 在生产环境中使用不同的缓存存储
config/environments/production.rb: # 在生产环境中,Apache 或 nginx 已经这样做了
config/newrelic.yml: # 大写的 RAILS_ENV(即生产、暂存等)
config/newrelic.yml: # 不要用于生产或负载测试。
config/newrelic.yml:# 在生产环境中开启代理进行 24x7 监控。新遗物
配置/newrelic.yml:生产:
config/newrelic.yml:# 与生产相同。提供对该环境的支持
Apache/Passenger/Rails 堆栈的这些小惊喜开始变得令人恼火。谁能帮我以正确的模式运行我的应用程序?
编辑:我可以说:
RailsEnv peeweeeffingherman
在那里,应用程序仍然以生产模式出现,我知道这是默认模式。显然,设置没有被读取。为什么会这样?
【问题讨论】: