gpt4 book ai didi

ruby-on-rails - Gitlab CI 和 Rails Postgres 崩溃

转载 作者:太空宇宙 更新时间:2023-11-03 16:42:42 24 4
gpt4 key购买 nike

我正在尝试在 Gitlab CI 上配置 CI 并收到此错误

$ rake db:create
/usr/local/bundle/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/usr/local/bundle/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "username"=>"runner", "database"=>"ems"}
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

最佳答案

.gitlab-ci.yml 中定义的服务是 a seperate docker instance不是本地服务。您需要更新数据库配置以指向名为 postgres

的主机

关于ruby-on-rails - Gitlab CI 和 Rails Postgres 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42223912/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com