我在将 pg:pull 与我的 Heroku postgres 数据库一起使用时遇到密码字段问题



我使用的是带有ubuntu操作系统的Cloud9 IDE。我最近从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"}

根据以下指令从命令行:

$ heroku pg:pull DATABASE_URL mylocaldb --app my-app-6503

heroku-cli:拉入postgresql-madows-7463--->mylocaldb
密码:

在该字段中输入密码后,它失败了:

createdb:无法连接到数据库模板1:FATAL:用户"ubuntu"的密码身份验证失败

Elliot的回答是我在本地设置postgres时遵循的说明。

我用这个答案解决了这个问题:

heroku pg:提取密码身份验证失败

来自Joel。

这对我来说没有任何意义,除了Heroku可能不会接受密码作为密码?

相关内容

最新更新