2
私は新しいRails 5アプリケーションを持っています。私はspring
とspring-commands-rspec
の宝石を指示通りにインストールしました。私はrspec
を単独で実行することができ、テストは正常に動作します。私は春のbinstub bin/rspec
を実行する場合しかし、私はこれを取得:春rspecがデータベースに接続できません
Running via Spring preloader in process 227
/usr/local/bundle/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `initialize': could not connect to server: No such file or directory (PG::ConnectionBad)
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
from /usr/local/bundle/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `new'
from /usr/local/bundle/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `connect'
from /usr/local/bundle/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'
from /usr/local/bundle/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
from /usr/local/bundle/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
etc...
私はbinstubsを使用し、bin/rspec
は素晴らしい作品Railsの4アプリを持っています。何がありますか?
なお、rake spec
は、同じデータベース接続エラーで同じ方法で失敗します。