我正在尝试在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"?
sudo service postgresql start
来启动它。 - Sajansudo service postgresql start
命令时,构建失败,退出码为1。 - denqxotlimage: ruby:2.4 services: - postgres - redis before_script: - sudo service postgresql start - cp config/database.yml.gitlabci config/database.yml - bundle install - RAILS_ENV=test rake db:create - RAILS_ENV=test rake db:migrate tests: script: 'bundle exec rspec' styleguide: script: 'bundle exec rubocop' variables: POSTGRES_DB: dbdb POSTGRES_USER: runner POSTGRES_PASSWORD: ""
- denqxotl