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

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

问题描述

我试图通过capistrano像页面 https://gorails.com/上的教程,将我的Rails应用程序通过capistrano部署在nginx和ubuntu上.部署/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
  1. Enter your app root
  2. run: rake secret
  3. copy the output
  4. go to /yourapp/config/secrets.yml
  5. set the production secret_key_base

重新启动乘客应用程序:

Restart the passenger app :

touch /yourapp/tmp/restart.txt

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

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