我正面临着heroku run rake db:create的以下问题
在RubyonRails技术和Postgresql数据库中的应用。
This is the legacy Heroku CLI. Please install the new CLI from https://cli.heroku.com
Running rake db:create on ⬢ project-name... up, run.2367 (Free)
FATAL: permission denied for database "postgres"
DETAIL: User does not have CONNECT privilege.
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "database"=>"abcdabcd", "username"=>"abcdabcd", "password"=>"abcdabcd", "port"=>5432, "host"=>"ec2-107-21-233-71.compute-1.amazonaws.com"}
rake aborted!
PG::ConnectionBad: FATAL: permission denied for database "postgres"
DETAIL: User does not have CONNECT privilege.你能告诉我在这个应用程序中我缺少什么吗?
提前谢谢。
发布于 2018-09-25 11:29:24
您不能在heroku上运行db:create。相反,您需要提供一个postgresql外接程序。这样做将为您创建一个数据库,并为您提供作为DATABASE_URL环境变量的凭据。
然后可以运行db:migrate来设置所有表。
https://stackoverflow.com/questions/52497078
复制相似问题