以下是我的database.yml

development:
     adapter:  postgresql
     host:     localhost
     encoding: unicode
     database: pepe_development
     pool:     5
     username: pepe
     password: password
     template: template0

当我做db:migrate时,我得到以下信息



帮帮我。我正在尝试在我的本地主机上开发它

最佳答案

终于工作正常

以 super 用户身份登录

ALTER TABLE schema_migrations OWNER TO menuquizz

\q

记录为menuquizz
menuquizz_development=# \d
                    List of relations
 Schema |           Name           |   Type   |   Owner
--------+--------------------------+----------+-----------
 public | .schema_migrations       | table    | denis
 public | menus                    | table    | menuquizz
 public | menus_id_seq             | sequence | menuquizz
 public | schema_migrations        | table    | menuquizz
(4 rows)

menuquizz_development=# \q

:~/Projects/menuquizz$ rake db:fixtures:load FIXTURES=menus
:~/Projects/menuquizz$ psql -U menuquizz menuquizz_development

Password for user menuquizz:
psql (9.3.10)
Type "help" for help.

menuquizz_development=> select count(*) from menus;
 count
-------
    45
(1 row)

OK

关于ruby-on-rails - PG::InsufficientPrivilege出现在/错误:关系schema_migrations的权限被拒绝,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32125696/

10-12 05:37