2017-02-14 13 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

は 'sudoのサービスPostgreSQLのstart'のERRORにこの1つを得た:失敗したビルド:ルビー:2.4 サービス: - postgresの - Redisの before_script終了コード1 – denqxotl

+0

はあなた.gitlab-ci.yml –

答えて

0

.gitlab-ci.ymlに定義されているサービスは、a seperate docker instanceローカルサービスではありません。 postgresという名前のホストを指すようにdb設定を更新する必要があります