# File lib/og/backends/psql.rb, line 34 def initialize(config) begin @conn = PGconn.connect(nil, nil, nil, nil, config[:database], config[:user], config[:password]) rescue => ex # gmosx: any idea how to better test this? if ex.to_s =~ /database .* does not exist/i Logger.info "Database '#{config[:database]}' not found!" PsqlBackend.create_db(config[:database], config[:user]) retry end raise end end