如何重新启动的Phusion客运+ APACHE在生产模式下的Ubuntu服务器Ruby on Rails的呢? [英] How to restart Phusion Passenger + Apache in Production mode on Ubuntu server for Ruby on Rails?

查看:114
本文介绍了如何重新启动的Phusion客运+ APACHE在生产模式下的Ubuntu服务器Ruby on Rails的呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的Apache +的Phusion乘客,我已经把

I am having Apache + phusion passenger, I have put

RailsEnv production

在/ etc / apache2的/网站的可用/默认的文件和已经重新启动Apache的,但是当我运行

in /etc/apache2/sites-available/default file and have restarted apache but when I am running

rails c
> Rails.env.production?

它给费尔斯,其中作为

it gives fales where as for

> Rails.env.development?

它给人真实的。是否有任何其他的方式来重启乘客,因为我觉得把RailsEnv生产的默认是正确的方式?顺便说一句,我使用

it gives true. Is there any other way to restart passenger as I do think putting "RailsEnv production" in default is the right way ? btw I am using

sudo service apache2 restart

如何开始在生产模式我on Rails应用程序的红宝石客运+ apache的?

How to start my ruby on rails app in Production mode with passenger + apache ?

推荐答案

您的应用程序可能是在生产模式了。

Your app is probably in production mode already.

在默认情况下,轨ç加载应用程序在李家贵模式。

By default, rails c loads the app in dvelopment mode.

如果你想在生产模式下启动控制台,请执行以下操作:

If you want your console to be launched in production mode, do the following :

RAILS_ENV =钢轨生产ç

在控制台和Web应用程序是两个不同的轨道proccess和独立运行。

The console and the web app are two different rails proccess and run independently.

您应该检查你的production.log文件,以确保您的应用程序在生产中运行。

You should check your production.log file to be sure that your app runs in production.

这篇关于如何重新启动的Phusion客运+ APACHE在生产模式下的Ubuntu服务器Ruby on Rails的呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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