Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Small fix for rake tasks when using PostgreSQL #43

Open
wants to merge 2 commits into
base: release-1.2
Choose a base branch
from
Open

Small fix for rake tasks when using PostgreSQL #43

wants to merge 2 commits into from

Conversation

tonyfg
Copy link

@tonyfg tonyfg commented May 29, 2013

rake db:drop and db:create are not working when the environment is configured for postgresql with login/password authentication.

The fix allows this scenario to work without affecting configurations that use other auth mechanisms.

@probablykabari
Copy link
Member

I'll take a gander, thanks!

@tonyfg
Copy link
Author

tonyfg commented May 31, 2013

No problem man :)

There is another way to feed the password to createdb and dropdb but it requires creating a ~/.pgpass file -- we might be overwriting a previous .pgpass file created by the user and that would be bad.
Setting the PGPASSWORD environment variable seems to be the only sane way to use the password from database.yml, especially if there are environments with different database passwords.

If you find any issues with the fix, just let me know and I'll try to find a different way to get around the problem.

@tpitale
Copy link
Member

tpitale commented Feb 7, 2016

I think this would have passed the build if it weren't for some other thing.

If you'd like me to, @tonyfg, I'll merge this.

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

Successfully merging this pull request may close these issues.

None yet

3 participants