关系schema_migrations的Postgres权限被拒绝
使用名为shine
的db用户忙于获取PG DB。 继Rails,Angular,Postgres和Bootstrap之后:我发起了:
createuser --createdb --login -P shine
bundle exec rails db:create
作品。
bundle exec rails db:migrate
得到:
bundle exec rails db:migrate rails aborted! ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied for relation schema_migrations : SELECT "schema_migrations".* FROM "schema_migrations" bin/rails:4:in `require' bin/rails:4:in `' PG::InsufficientPrivilege: ERROR: permission denied for relation schema_migrations bin/rails:4:in `require' bin/rails:4:in `' Tasks: TOP => db:migrate (See full trace by running task with --trace)
在psql \list
给出:
shine_development | shine | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/shine + | | | | | shine=CTc/shine shine_test | shine | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/shine + | | | | | shine=CTc/shine
我已经尝试了所有可以找到的ALTER,GRANT和OWNER TO命令。 这是怎么回事?
database.yml的
default: &default adapter: postgresql encoding: unicode host: localhost username: shine password: shine pool: development: <<: *default database: shine_development
- Order BY将30ms查询转换为7120ms查询。 已知的性能问题?
- 为什么我无法使用rails 4.0.0.rc1(ruby 2.0)安装postgresql
- Rails 4:heroku基本计划上的ConnectionTimeoutError
- Heroku Rails Rake任务同步生产和本地DB
- ProtocolViolation:ERROR:绑定消息提供0个参数,但是准备好的语句“”需要1
- 我的应用程序访问远程数据库。 如何有效地运行unit testing?
- 有没有办法将params传递给rails中的postgres原始查询?
- Mountain Lion上的pg gem’0.14.0’失败了
- ActiveRecord可以远程连接到PostgreSQL并保护数据库密码吗?