1

当我运行测试 rspec 时,出现错误

1) Nimba::Storages DropboxStorages returns http success
 Failure/Error: Unable to find matching line from backtrace
 Moped::Errors::ConnectionFailure:
   Could not connect to a primary node for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>

我不知道为什么会出现这个错误?

谢谢..

4

1 回答 1

0

通过向 spec/spec_helper.rb 添加一行来解决问题

DatabaseCleaner.orm = "mongoid"
于 2012-11-16T15:13:33.093 回答