Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support PostgreSQL connections with no username set

  • Loading branch information...
commit d1b88f5512b1623b22d71ec4aa74655ecd487430 1 parent ec417fe
@purcell authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tasks/db_console.rake
3  tasks/db_console.rake
@@ -24,10 +24,11 @@ namespace :db do
'--default-character-set', config["encoding"],
'-D', config["database"])
when "postgresql"
+ ENV['PGUSER'] = config["username"] if config["username"]
ENV['PGHOST'] = config["host"] if config["host"]
ENV['PGPORT'] = config["port"].to_s if config["port"]
ENV['PGPASSWORD'] = config["password"].to_s if config["password"]
- system(find_cmd('psql'), '-U', config["username"], config["database"])
+ system(find_cmd('psql'), config["database"])
when "sqlite"
system(find_cmd('sqlite'), config["database"])
when "sqlite3"
Please sign in to comment.
Something went wrong with that request. Please try again.