Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db:push fails silently #57

Open
hallmatt opened this issue Mar 24, 2015 · 2 comments
Open

db:push fails silently #57

hallmatt opened this issue Mar 24, 2015 · 2 comments

Comments

@hallmatt
Copy link

I've pushed my db up using "cap staging db:push" to the staging server, and all the commands look as if they're succeeding, but it seems like it's failing silently, somewhere. When I run a rails console or go to the staging site, the data isn't uploaded. I also restarted the web service to see if that helped, but it did not. Any ideas? Here's the feedback I get when I run "cap staging db:push". Anything wrong here?

local {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"example_website_development", "host"=>"localhost", "pool"=>5, "min_messages"=>"WARNING", "username"=>"MyLocalUsername"}
INFO Uploading db/example_website_development_2015-03-24-170745.sql.bz2 61.86%
INFO Uploading db/example_website_development_2015-03-24-170745.sql.bz2 100.0%
INFO [5482fc3a] Running /usr/bin/env cd /home/example_website/public_html/examplewebsite.hostname.com/current && bunzip2 -f db/example_website_development_2015-03-24-170745.sql.bz2 && RAILS_ENV=staging && PGPASSWORD='databasepassword' psql -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'example_website_staging' AND pid <> pg_backend_pid();;"  -U example_website ; PGPASSWORD='databasepassword' dropdb  -U example_website  example_website_staging; PGPASSWORD='databasepassword' createdb  -U example_website  example_website_staging; PGPASSWORD='databasepassword' psql  -U example_website  -d example_website_staging < db/example_website_development_2015-03-24-170745.sql as [email protected]
INFO [5482fc3a] Finished in 5.441 seconds with exit status 0 (successful).
INFO [d5236471] Running /usr/bin/env cd /home/example_website/public_html/examplewebsite.hostname.com/current && rm db/example_website_development_2015-03-24-170745.sql as [email protected]
INFO [d5236471] Finished in 0.106 seconds with exit status 0 (successful).
@numbata
Copy link
Collaborator

numbata commented Apr 22, 2015

@hallmatt can you run cap --backtrace staging db:push?

@sauliusgrigaitis
Copy link
Contributor

Same here. You can reproduce by running db:push on PostgreSQL db with credentials that doesn't have permission to drop/create database. It fails silently without any notice even with --backtrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants