客运及Rails 拒绝在生产环境中启动
我有一个生产服务器拒绝在“生产”环境中启动。它最近运行 Rails 2.x 和 Passenger 1(或 2 不记得了)都很好。升级后的导轨和Passenger 现在它在开发环境中启动,尽管 Passenger 文档说它应该默认为生产环境。我们没有更改其默认设置中的任何内容。
虽然我只是尝试将 RailsEnv production
添加到虚拟主机文件中......但没有效果。
我该如何解决这个问题?我在控制台中看到的唯一输出是:
server:current elvis$ rails c
Loading development environment (Rails 3.0.3)
尝试使用网络浏览器点击应用程序会出现此对话框 经过长时间延迟(30 秒以上)
- Mac OS X Server 10.5.8
- Rails 3.0.3
- Passenger 3.0.0
- MySQL:5.0.82
I have a production server that refuses to start up in the 'production' environment. it recently ran Rails 2.x and Passenger 1 (or 2 can't remember) just fine. Upgraded Rails & Passenger and now it starts up in the development environment even though Passenger docs say it should default to production. We haven't changed anything in its default setup.
Though I just tried adding RailsEnv production
to the Virtual Hosts file...to no effect.
How can I troubleshoot this? The only output I see in the console is:
server:current elvis$ rails c
Loading development environment (Rails 3.0.3)
and trying to hit app with a web browser presents this dialog after a long delay (30+ secs)
- Mac OS X Server 10.5.8
- Rails 3.0.3
- Passenger 3.0.0
- MySQL: 5.0.82
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否将 Passenger 安装到 Nginx 或 Apache?您可以通过运行网络服务器来启动 Rails 应用程序,而不是
rails c
。例如,Nginx 将加载 Passenger 模块,该模块将根据需要运行您的 Rails 应用程序。因此,启动 Nginx 或 Apache 就可以了。Did you install Passenger to Nginx or Apache? You start the Rails app by running the webserver, not
rails c
. Nginx, for example, will then load the Passenger module which will run your Rails app as needed. So, startup Nginx or Apache and you should be good to go.