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

Avram::Migrator::Runner assumes hostname is present and does not work when using UNIX domain socket #273

Closed
wezm opened this issue Nov 2, 2019 · 0 comments · Fixed by #333

Comments

@wezm
Copy link

wezm commented Nov 2, 2019

If postgres is running via a UNIX domain socket instead of binding to a tcp port Avram::Migrator::Runner.create_db fails with the error:

createdb: could not connect to database template1: could not translate host name "-p" to address: Name or service not known

The DATABASE_URL in this case looks something like this: postgres://wmoore@/read_rust_development, as per the PostgreSQL docs.

The default behavior when host is not specified is to connect to a Unix-domain socket in /tmp (or whatever socket directory was specified when PostgreSQL was built).

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