Rails 2.3.3-设置为生产模式 [英] Rails 2.3.3 - Setting to production mode

查看:88
本文介绍了Rails 2.3.3-设置为生产模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将应用程序设置为生产模式?

好的,这肯定是一件容易的事,但是我要部署我的第一个Rails应用程序,并且我已经正确设置了所有东西:Ubuntu Hardy,Passenger,MySQL.但是,它仍在开发模式下运行.我只能找到旧版Rails的文档,并希望确保自己做的正确.

Okay, this must be a no-brainer but I'm about to deploy my first Rails app and I've got everything setup properly: Ubuntu Hardy, Passenger, MySQL. However, it's still running in development mode. I've only been able to find documentation for older versions of Rails and want to make sure that I'm doing it right.

谢谢.

推荐答案

您需要设置RackEnv而不是RailsEnv.其实,我只是两者都做(尽管我可能不需要...?).

You'll need to set the RackEnv instead of RailsEnv. Actually, I just do both (although I mightn't need to...?).

Rails 2.3应用程序的示例虚拟主机:

Example vhost for a Rails 2.3 app:

<VirtualHost *:80>

  ...
  RackEnv production
  RailsEnv production
  ...

</VirtualHost>

这篇关于Rails 2.3.3-设置为生产模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆