Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.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
Ruby on rails ActiveRecord::JDBCError:org.postgresql.util.PSQLException:致命:主机没有pg_hba.conf条目_Ruby On Rails_Ruby_Postgresql_Heroku_Rails Activerecord - Fatal编程技术网

Ruby on rails ActiveRecord::JDBCError:org.postgresql.util.PSQLException:致命:主机没有pg_hba.conf条目

Ruby on rails ActiveRecord::JDBCError:org.postgresql.util.PSQLException:致命:主机没有pg_hba.conf条目,ruby-on-rails,ruby,postgresql,heroku,rails-activerecord,Ruby On Rails,Ruby,Postgresql,Heroku,Rails Activerecord,我正在heroku上部署一个Rails项目(使用jruby)。 已成功部署,但我无法运行: heroku运行rake数据库:迁移 (我是应用程序的合作者之一,而不是所有者) 它正在引发一个异常: ActiveRecord::JDBCError:org.postgresql.util.psql异常:致命:主机“54.163.178.100”、用户“XXXX”、数据库“YYYY”、SSL关闭没有pg_hba.conf条目 经过搜索,我得到了一种方法,即在DB url中添加?ssl=true&sslf

我正在heroku上部署一个Rails项目(使用jruby)。 已成功部署,但我无法运行:

heroku运行rake数据库:迁移

(我是应用程序的合作者之一,而不是所有者)

它正在引发一个异常:

ActiveRecord::JDBCError:org.postgresql.util.psql异常:致命:主机“54.163.178.100”、用户“XXXX”、数据库“YYYY”、SSL关闭没有pg_hba.conf条目

经过搜索,我得到了一种方法,即在DB url中添加
?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
,但我不确定在哪里添加它

除此之外,当我尝试在我个人帐户的应用程序上部署相同的Rails项目时,它工作正常。
heroku run rake db:migrate
正在获得成功

有人能帮我解决这个问题吗?

。这不是证书验证的问题。问题是您需要启用SSL


致。

感谢克雷格的回复。检查了您发送的第一个链接。根据这一点,如果heroku应用程序正在使用heroku postgres,我们似乎不需要做任何事情,这就是我的情况。那么我们还需要设置这个属性吗?我的应用程序和heroku postgres之间的连接是否被视为外部连接?没有得到的东西,新的heroku和ROR,你能解释一下吗?
ssl=true