Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
PostgresSQL deploy:migrate issue while deploying with Capistrano Rails
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
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 email@example.com
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 firstname.lastname@example.org
DEBUG [64a72276] Command: cd /home/deploy/app/releases/20170313091718 && ( export RAILSENV=“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 “184.108.40.206” 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/activerecord/connectionadapters/postgresqladapter.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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×