Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
连接到Heroku PostgreSQL数据库_Postgresql_Heroku_Ruby On Rails 4 - Fatal编程技术网

连接到Heroku PostgreSQL数据库

连接到Heroku PostgreSQL数据库,postgresql,heroku,ruby-on-rails-4,Postgresql,Heroku,Ruby On Rails 4,嗨,我是Rails和Postgres+Heroku的新手。我开发了一个web,就像PHP一样,您可以看到用户输入的记录,并使用phpMyAdmin输入。但是Rails呢?我怎样才能看到这些记录 我已经将应用程序上传到Heroku,所以现在我想查看我的制作数据。更重要的是,我的测试和开发数据也无法在PGAdmin中查看。您可以连接到Heroku Postgres,就像连接本地数据库一样 转到,选择数据库,它将显示连接设置。在页面的最右侧有一个图标,上面有两个箭头,选择它将为您提供各种技术的连接字符

嗨,我是Rails和Postgres+Heroku的新手。我开发了一个web,就像PHP一样,您可以看到用户输入的记录,并使用phpMyAdmin输入。但是Rails呢?我怎样才能看到这些记录


我已经将应用程序上传到Heroku,所以现在我想查看我的制作数据。更重要的是,我的测试和开发数据也无法在PGAdmin中查看。

您可以连接到Heroku Postgres,就像连接本地数据库一样

转到,选择数据库,它将显示连接设置。在页面的最右侧有一个图标,上面有两个箭头,选择它将为您提供各种技术的连接字符串,包括一个psql命令行,您只需复制并粘贴到终端即可

它将看起来像:

psql "dbname=ddgadagin host=ec2-107-12-168-211.compute-1.amazonaws.com user=dgddgargarg password=huu55ihfwqreergr port=5432 sslmode=require"