Rails应用程序只在开发模式下运行,没有login生产

我创build了超级简单的rails应用程序

rails test cd test/ script/generate controller home index rm public/index.html # uncommented map.root :controller => "home" in config/routes.rb 

当我在开发模式下运行应用程序,它工作得很好,一切都logging

 <VirtualHost *:80> DocumentRoot /opt/rails/test/public ErrorLog /opt/rails/test/log/error.log CustomLog /opt/rails/testlog/access.log combined RailsEnv development </VirtualHost> 

但是当我改成RailsEnv制作时,

 RailsEnv production 

我得到这个丑陋的错误页面

 We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly. 

在error.log或production.log中绝对没有,但是,在access.log中,我可以看到请求被logging。

我正在运行Ubuntu x64 Jaunty。

你应该从github安装ssl_requirement插件。 在生产环境中运行时,您将收到包含错误消息/会话转储等的电子邮件。

http://github.com/rails/ssl_requirement/tree/master

另外,“rm public / index.php”命令应该是“rm public / index.html”。

我会检查/ var / log / apache2中的日志,以确保你没有遗漏任何东西。 我知道日志应该在你的自定义目录中,但是…