Ruby on rails I';我在我的Heroku postgres数据库中使用pg:pull时遇到密码字段问题
我使用的是Ruby on rails I';我在我的Heroku postgres数据库中使用pg:pull时遇到密码字段问题,ruby-on-rails,postgresql,heroku,Ruby On Rails,Postgresql,Heroku,我使用的是Cloud9IDE,它有一个ubuntu操作系统。我最近从Rails应用程序中卸载了本地SQLlite3数据库,并成功安装了本地postgres数据库。我现在正试图从Heroku提取postgres制作数据库 如果我在Rails控制台中运行ActiveRecord::Base.connection.instance\u variable\u get(:@config): {:adapter=>“postgresql”、:encoding=>“unicode”、:pool=>5、:tem
Cloud9IDE
,它有一个ubuntu
操作系统。我最近从Rails应用程序中卸载了本地SQLlite3数据库,并成功安装了本地postgres数据库。我现在正试图从Heroku提取postgres制作数据库
如果我在Rails控制台中运行ActiveRecord::Base.connection.instance\u variable\u get(:@config)
:
{:adapter=>“postgresql”、:encoding=>“unicode”、:pool=>5、:template=>“template0”、:username=>“ubuntu”、:password=>“password”、:database=>“learning\u app\u development”}
根据说明从命令行执行以下操作:
$ heroku pg:pull DATABASE_URL mylocaldb --app my-app-6503
heroku cli:postgresql-meadows-7463--->mylocaldb密码: 在该字段中输入密码后,失败: createdb:无法连接到数据库模板1:致命:用户“ubuntu”的密码验证失败
是我在本地设置postgres时遵循的说明 我用这个答案解决了这个问题: 来自乔尔 除了Heroku可能不会接受密码作为密码之外,这对我来说没有任何意义