2017-02-14 40 views
1

我想對Gitlab CI配置CI和得到這個錯誤Gitlab CI&Rails的Postgres的崩潰

$ 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"? 
+0

您的postgres服務是否正在運行?你可以通過'sudo service postgresql start'啓動它。 – Sajan

+0

得到這一項上'須藤服務的PostgreSQL start' ERROR:構建失敗:退出代碼1 – denqxotl

+0

確實顯示您的.gitlab-ci.yml –

回答

0

在.gitlab-ci.yml定義的服務是a seperate docker instance不是本地服務。您需要更新您的db配置以指向名爲postgres