When I run the command: rake db:migrate RAILS_ENV=production
I get the following error:
rake aborted!
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "1.2.3.4" and accepting
TCP/IP connections on port 5432?
So I guess my server is not listening on port 5432. So how do I solve this?
I tried running command: sudo service postgresql start
but I still get that same error.
I know I have to edit some file so in addition to the instructions on how to actually edit the file (I guess it is the file named postgresql.conf
?) please also tell me where I should find it.
My web application is on this directory at the server: /home/admin/www/webstudio
EDIT: I have already tried my best to follow the instructions given here: http://alexbachuk.com/launch-rails-4-application-with-passenger-and-nginx/