diff --git a/bin/que b/bin/que index 148824d..b38d3f9 100755 --- a/bin/que +++ b/bin/que @@ -109,7 +109,16 @@ Que.logger ||= Logger.new($stdout) if options.ci require "active_record" + ActiveRecord::Base.establish_connection( + adapter: "postgresql", + host: ENV.fetch("PGHOST", "localhost"), + user: ENV.fetch("PGUSER", "postgres"), + password: ENV.fetch("PGPASSWORD", ""), + database: ENV.fetch("PGDATABASE", "que-test"), + ) + Que.connection = ActiveRecord + Que.migrate! end begin