Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-197

ReplSetConnection documentation for Ruby appears to be incorrect

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: drivers
    • Labels:

      http://api.mongodb.org/ruby/current/Mongo/ReplSetConnection.html has the following example of code.

      ReplSetConnection.new(['localhost:30000', 'localhost:30001'], :read => :secondary)

      I create a local replica set with 2 nodes listening on the ports listed above.

      Calling this will fail with a message: Mongo::ConnectionFailure: Cannot connect to a replica set using seeds localhost:30000:localhost:30001

      Changing it to Mongo::ReplSetConnection.new(['localhost',30000], ['localhost',30001], :read => :secondary) does work correctly.

            Assignee:
            gjmurakami Gary Murakami
            Reporter:
            nielsm Niels Meersschaert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              11 years, 48 weeks, 3 days ago