我有一个使用MySQL数据库的Rails应用程序。我想使用Heroku CI,因为它与管道紧密集成,但是在设置测试数据库时看到以下错误:
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
假设我使用的是Postgres。我正在使用JawsDB插件在Heroku上使用MySQL,因此我尝试在我的app.json文件中为我的测试环境指定它:
"environments": {
"test": {
"addons": [
"jawsdb:kitefin"
]
}
},
但是这似乎没有什么区别,我看到了相同的错误。 Heroku会强迫您在CI中使用Postgres吗?如果是这样,我将不得不使用CircleCI等其他服务。
答案 0 :(得分:1)
您可以尝试这种附加的in-dyno:
"addons": ["jawsdb:kitefin:in-dyno"]
https://devcenter.heroku.com/articles/heroku-ci-in-dyno-databases