Я новичок на рельсы, некоторые ошибки произошли, когда я попытался запустить bundle exec rake test:prepare
, тот же вопрос был задан Click here, я включил Psql вывод. Кто-нибудь может помочь? Спасибо.ActiveRecord :: StatementInvalid: PG :: Ошибка: ОШИБКА: должна быть владельцем базы данных
ошибки я получил протекающие:
rake aborted!
ActiveRecord::StatementInvalid: PG::Error: ERROR: must be owner of database testp00
: DROP DATABASE IF EXISTS "testp00"
/Users/snailwalker/.rvm/gems/ruby-2.0.0-p481/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `exec'
/Users/snailwalker/.rvm/gems/ruby-2.0.0-p481/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
/Users/snailwalker/.rvm/gems/ruby-2.0.0-p481/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:435:in `block in log'
/Users/snailwalker/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-(required)>'
/Users/snailwalker/.rvm/gems/ruby-2.0.0-p481/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:370:in `block (3 levels) in <top (required)>'
Tasks: TOP => db:test:load => db:test:purge
(See full trace by running task with --trace)
PSQL:
snailwalker=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------------+-------------+----------+---------+-------+-----------------------------
devep00 | snailwalker | UTF8 | C | UTF-8 |
myapp_development | snailwalker | UTF8 | C | UTF-8 |
myapp_test | snailwalker | UTF8 | C | UTF-8 |
postgres | snailwalker | UTF8 | C | UTF-8 |
snailwalker | snailwalker | UTF8 | C | UTF-8 |
template0 | snailwalker | UTF8 | C | UTF-8 | =c/snailwalker +
| | | | | snailwalker=CTc/snailwalker
template1 | snailwalker | UTF8 | C | UTF-8 | =c/snailwalker +
| | | | | snailwalker=CTc/snailwalker
testp00 | snailwalker | UTF8 | C | UTF-8 |
(8 rows)
databse.yml:
development:
adapter: postgresql
encoding: unicode
database: devep00
pool: 5
username: taouan
password:
test:
adapter: postgresql
encoding: unicode
database: testp00
pool: 5
username: taouan
password:
Можете ли вы разместить базу данных.yml – RAJ
Привет, только что отправил, спасибо. – Snailwalker
haha Я просто понял, есть имя пользователя. «taouan» – Snailwalker