问题
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