【发布时间】:2017-06-13 16:55:11
【问题描述】:
我正在使用具有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"}
根据these 指令从命令行:
$ heroku pg:pull DATABASE_URL mylocaldb --app my-app-6503
heroku-cli:拉取 postgresql-meadows-7463 ---> mylocaldb
密码:
我在此字段输入密码后,失败:
createdb:无法连接到数据库模板 1:致命:用户“ubuntu”的密码验证失败
This answer by Elliot 是我在本地设置 postgres 时遵循的说明。
【问题讨论】:
标签: ruby-on-rails postgresql heroku