2
새로운 Rails 5 앱이 있습니다. 지침에 지정된대로 spring
및 spring-commands-rspec
개의 보석을 설치했습니다. 난 rspec
그 자체로 테스트를 잘 실행할 수 있습니다. 내가 bin/rspec
binstub 봄을 실행하는 경우,이 얻을 :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
가 잘 작동 레일 4 응용 프로그램을 가지고있다. 뭐라 구요?
덧붙여 말하자면, rake spec
은 데이터베이스 연결 오류와 동일한 방식으로 실패합니다.