我正在使用Cloud9 IDE
操作系统ubuntu
。我最近从我的Rails应用程序中卸载了我的本地SQLlite3数据库,并成功安装了本地postgres数据库。我现在正试图从Heroku中提取postgres生产数据库。
如果我在Rails控制台中运行ActiveRecord::Base.connection.instance_variable_get(:@config)
:
{:adapter =>“postgresql”,:encoding =>“unicode”,:pool => 5,:template =>“template0”,:username =>“ubuntu”,:password = >“password”,:database =>“learning_app_development”}
从命令行按these说明操作:
$ heroku pg:pull DATABASE_URL mylocaldb --app my-app-6503
heroku-cli:拉postgresql-meadows-7463 ---> mylocaldb
密码:
在此字段中输入密码后,它将失败:
createdb:无法连接到数据库template1:FATAL:用户“ubuntu”的密码验证失败
This answer by Elliot是我在本地设置postgres时所遵循的说明。
答案 0 :(得分:0)