2

I am getting the following error for the all rspec tests, which have been working fine before... Really strange thing is that I didn't change anything with regard to mongod or rspec or mongoid... :( I can access mongo shell just fine, too.

Any help or suggestion for debugging this would be much appreciated!

  • Ruby: 1.9.3p194
  • Rails: 3.2.12
  • Mongod: 2.2
  • Mongoid: 3.1.4

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=nil>]>

Link to mongoid.yml: https://gist.github.com/yangtheman/5879742

4

1 回答 1

0

这也太尴尬了,不过我找到了错误的根源。我以某种方式注释掉了主机文件中的 localhost 行。当我取消注释时,一切都恢复正常。

于 2013-06-28T16:38:30.737 回答