“从应用程序收到不完整的响应"来自 nginx/乘客 [英] "Incomplete response received from application" from nginx / passenger

查看:21
本文介绍了“从应用程序收到不完整的响应"来自 nginx/乘客的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过 capistrano 在 nginx 和 ubuntu 上部署我的 rails 应用程序,就像页面上的教程 https://gorails.com/部署/ubuntu/14.04.但最后我收到一条错误消息:

I tried to deploy my rails app on nginx and ubuntu via capistrano like the tutorial on the page https://gorails.com/deploy/ubuntu/14.04. but at the end i get an error message:

Incomplete response received from application

在我的浏览器中.这可能是乘客的错误,但我怎么知道该怎么做?

in my browser. this is probably an error from passenger, but how can i figure out what to do?

推荐答案

您的 rails_env 产品不需要设置,可能缺少 secret_key_base.

Your rails_env production don't have required set up,probably missing secret_key_base.

打开 /etc/nginx/sites-available/default 并将 rails_env 更改为 development:

Open /etc/nginx/sites-available/default and change the rails_env to development:

rails_env production;
        to
rails_env development;

如果应用正在加载,则不是乘客问题.

生产解决方案:

If the app is loading it's not a passenger issue.

Production Solution:

  1. 输入您的应用根目录
  2. 运行:rake secret
  3. 复制输出
  4. /yourapp/config/secrets.yml
  5. 设置生产secret_key_base

重新启动乘客应用:

touch /yourapp/tmp/restart.txt

这篇关于“从应用程序收到不完整的响应"来自 nginx/乘客的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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