0
をConnectionNotEstablished:是正の宝石は、モンゴは、ActiveRecordのテスト::すべてのテストがエラーで失敗是正宝石を追加した後
ActiveRecord::ConnectionNotEstablished:
No connection pool for ActiveRecord::Base
我々が使用している:
宝石:
- のRails 4.2.8を
- モンゴイド5
- 1整流0.9.1
- RSpecの3.4.4
別:
- OS:Ubuntuの16.04LTE
- のMongoDB:ドッキングウィンドウ-コンが運営3.4.3
- データベース。
- ドッキングウィンドウ・コンバージョンすべてが正常に動作し、開発モードに1.12.0
。
mongoid.yml
development:
clients:
default:
database: development
hosts:
- localhost:27017
options:
heartbeat_frequency: 10
local_threshold: 0.015
server_selection_timeout: 30
max_pool_size: 5
min_pool_size: 1
wait_queue_timeout: 1
connect_timeout: 10
socket_timeout: 5
ssl: false
ssl_cert: /path/to/my.cert
ssl_key: /path/to/my.key
ssl_key_pass_phrase: password
ssl_verify: true
ssl_ca_cert: /path/to/ca.cert
options:
include_root_in_json: false
include_type_for_serialization: false
preload_models: false
raise_not_found_error: false
scope_overwrite_exception: false
use_activesupport_time_zone: true
use_utc: false
log_level: debug
test:
clients:
default:
database: test
hosts:
- localhost:27017
options:
heartbeat_frequency: 10
local_threshold: 0.015
server_selection_timeout: 30
max_pool_size: 1
min_pool_size: 1
wait_queue_timeout: 4
connect_timeout: 10
socket_timeout: 5
ssl: false
ssl_cert: /path/to/my.cert
ssl_key: /path/to/my.key
ssl_key_pass_phrase: password
ssl_verify: true
ssl_ca_cert: /path/to/ca.cert
options:
include_root_in_json: false
include_type_for_serialization: false
preload_models: false
raise_not_found_error: false
scope_overwrite_exception: false
use_activesupport_time_zone: true
use_utc: false
log_level: debug
STACKTRACE
ActiveRecord::ConnectionNotEstablished:
No connection pool for ActiveRecord::Base
# /home/user_home_directory/.rvm/gems/[email protected]/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:570:in `retrieve_connection'
# /home/user_home_directory/.rvm/gems/[email protected]/gems/activerecord-4.2.8/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
# /home/user_home_directory/.rvm/gems/[email protected]/gems/activerecord-4.2.8/lib/active_record/connection_handling.rb:87:in `connection'
# /home/user_home_directory/.rvm/gems/[email protected]/gems/activerecord-4.2.8/lib/active_record/fixtures.rb:501:in `create_fixtures'
# /home/user_home_directory/.rvm/gems/[email protected]/gems/activerecord-4.2.8/lib/active_record/fixtures.rb:979:in `load_fixtures'
# /home/user_home_directory/.rvm/gems/[email protected]/gems/activerecord-4.2.8/lib/active_record/fixtures.rb:952:in `setup_fixtures'
# /home/user_home_directory/.rvm/gems/[email protected]/gems/activerecord-4.2.8/lib/active_record/fixtures.rb:826:in `before_setup'
そこにいくつかの単純なミスがテスト・データベース構成にあるが、私はまさに理解することはできませんように見えます。
ご協力いただければ幸いです。ありがとうございました!