1. Michael Granger
  2. ruby-pg
  3. Issues

Issues

Issue #50 invalid

rake db:create with PG (Win 7 x64 / PostgreSQL 9.0)

Blackpyb
created an issue

When I tried to "rake db:create" it got an error below:

{{{
//C:\projetos\florarails>rake db:create
(in C:/projetos/florarails)
PGError: ERROR: permissπo negada ao criar banco de dados
CREATE DATABASE "florarails_test" ENCODING = 'utf8' c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connect ion_adapters/abstract_adapter.rb:202:in rescue in log' c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connect ion_adapters/abstract_adapter.rb:194:inlog' c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connect ion_adapters/postgresql_adapter.rb:496:in execute' c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/connect ion_adapters/postgresql_adapter.rb:575:increate_database' c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/railtie s/databases.rake:92:in rescue in create_database' c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/railtie s/databases.rake:39:increate_database' c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0/lib/active_record/railtie s/databases.rake:33:in block (2 levels) in <top (required)>' c:/Ruby192/lib/ruby/1.9.1/rake.rb:634:incall' c:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in block in execute' c:/Ruby192/lib/ruby/1.9.1/rake.rb:629:ineach' c:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in execute' c:/Ruby192/lib/ruby/1.9.1/rake.rb:595:inblock in invoke_with_call_chain' c:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize' c:/Ruby192/lib/ruby/1.9.1/rake.rb:588:ininvoke_with_call_chain' c:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in invoke' c:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:ininvoke_task' c:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in block (2 levels) in top_level' c:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:ineach' c:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in block in top_level' c:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:instandard_exception_handling' c:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in top_level' c:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:inrun' c:/Ruby192/bin/rake:31:in `<main>' Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"UTF-8", "dat abase"=>"florarails_test", "pool"=>5, "username"=>"exercicio_livro", "password"=

"rails"}// }}}

And this occurs to other 2 databases (dev and production).

Comments (2)

  1. Michael Granger repo owner

    I don't read Portuguese, but according to Google, the error is stemming from the fact that whatever user you have configured doesn't have permission to create databases. If you still believe this to be a bug in the PostgreSQL driver itself, please create a minimal test case that doesn't involve ActiveRecord (i.e., it should expressed in terms of `PGconn` and `PGresult` objects, and should run without ActiveRecord or ActiveSupport installed) and reopen this ticket.

  2. Log in to comment