Incomplete response received from application

懵懂的女人 提交于 2019-12-04 06:36:27

问题


I want to deploy my rails app using phusion passenger in test environment DB. I have configured the following lines in my database.yml

test:
  adapter: mysql2
  database: testdb
  username: testuser
  password: pass
  host: x.x.x.x

when I start the passenger "passenger start -a x.x.x.x -p 3000 -d -e test" it started working. but when I open the application URL in browser it should me an error like "Incomplete response received from application". I don't know what will be the problem? I have searched well in SO. only they have provide solution for production mode. but I want to run the application in test mode. I am able to run in development mode. when I try to run in test mode only it showed the error. please help to get rid from this problem. Thanks in advance


回答1:


don't forget make a secret key in your production server

$ rake secret

and define it in your "config/secrets.yml"

production:
  secret_key_base: "your key result from rake secret command "

Greeting




回答2:


Your Production Rails_env is not setup properly.

To solve this issue open file sudo nano /etc/nginx/sites-available/default and change the rails_evn to development.

if you want to solve this issue in Production environment. Edit file /rails_application/config/secrets/yml and set the production secret_key_base what you can generate running rake secret in your terminal.

And restart your nginx server. using command sudo service nginx restart



来源:https://stackoverflow.com/questions/30395157/incomplete-response-received-from-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!