QueueClassic/queue_classic

Supplied user/pass fails during migration

Closed this issue · 3 comments

I supplied a user/pass for QC_DATABASE_URL like this:
ENV["QC_DATABASE_URL"] = "postgres://user1:pass@localhost/db_development"
When migrating I get password authentication failed for user "another_user"

That's weird...where did you setup this? How are you starting queue_classic? Are you using Rails? Which version of qc (and Rails if you use it)? Is the other user a user you've seen before or something totally random? Is it really another_user?

senny commented

Did you try setting DATABASE_URL? If you are using Rails the connection should be inferred from Active Record.

@jipiboily @senny
Thanks a lot for the replies. Actually, when I was writing a reply to you both and listing out my steps to reproduced, I was able to get the migration to work! I'm not sure what went wrong... maybe by supplying the port it started to work?

ENV['QC_DATABASE_URL'] = 'postgres://db_owner:pass@192.168.xx.xxx:5432/db_development'

I'm not sure why Rails didn't infer my connection, because I need to set the QC_DATABASE_URL in order for it to work.

I'm using Rails 4.2.4, gem 'queue_classic', '~>3.0.0' and ruby 2.2.3p173