I am trying to use Padrino with Sequel and Postgres and am having no luck connecting.
In my pg_hba.conf I set the postgres user to 'trust' so no password is required (and can log in using PgAdmin without a password).
# TYPE DATABASE USER ADDRESS METHOD
local all postgres trust
My Padrino connection looks like this:
Sequel::Model.plugin(:schema)
Sequel::Model.raise_on_save_failure = false # Do not throw exceptions on failure
Sequel::Model.db = case Padrino.env
when :development then Sequel.connect(:adapter=>'postgres', :host=>'localhost', :database=>'padrino_template_development', :user=>'postgres', :password=>'', :loggers => [logger])
when :production then Sequel.connect("postgres://localhost/padrino_template_production", :loggers => [logger])
when :test then Sequel.connect("postgres://localhost/padrino_template_test", :loggers => [logger])
end
When I then try and run the rake task sq:create
I get this message
rake sq:create
=> Creating database 'padrino_template_development'
Password:
createdb: could not connect to database postgres: FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"
<= sq:create executed
What am I doing incorrectly here?