Report this

What is the reason for this report?

PostgresSQL deploy:migrate issue while deploying with Capistrano Rails

Posted on March 13, 2017

Hello ! I’m trying to deploy a rails 5 app with ubuntu 16.04 etc… On cap production deploy I get the following error on deploy:migrate

INFO [deploy:migrate] Run rake db:migrate DEBUG [15816e11] Running if test ! -d /home/deploy/app/releases/20170313091718; then echo “Directory does not exist ‘/home/deploy/app/releases/20170313091718’” 1>&2; false; fi as deploy@138.68.83.124 DEBUG [15816e11] Command: if test ! -d /home/deploy/app/releases/20170313091718; then echo “Directory does not exist ‘/home/deploy/app/releases/20170313091718’” 1>&2; false; fi DEBUG [15816e11] Finished in 0.306 seconds with exit status 0 (successful). INFO [64a72276] Running ~/.rvm/bin/rvm default do bundle exec rake db:migrate as deploy@138.68.83.124 DEBUG [64a72276] Command: cd /home/deploy/app/releases/20170313091718 && ( export RAILS_ENV=“production” ; ~/.rvm/bin/rvm default do bundle exec rake db:migrate ) DEBUG [64a72276] rake aborted! DEBUG [64a72276] PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host “138.68.83.124” and accepting TCP/IP connections on port 5432? DEBUG [64a72276] /home/deploy/app/shared/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `initialize’

Do you have any pointers? to make it work can’t seem to find similar issue on deployment server

note i tried this it didn’t work: https://www.digitalocean.co

All input welcomed thanks! Thanks

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.