Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-814

/database in Connection String URI should be optional

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Public API
    • Labels:
      None

      Description

      Documentation says that /database is optional (default is the 'admin' database) in the Connection String URI http://docs.mongodb.org/manual/reference/connection-string/

      For example:

          client = Mongo::Client.new("mongodb://localhost:27017")

      results in something like the following:

          /Users/gjm/10gen/mongo-ruby-driver/lib/mongo/database.rb:151:in `initialize': nil is an invalid database name. Please provide a string or symbol. (Mongo::Database::InvalidName)
                  from /Users/gjm/10gen/mongo-ruby-driver/lib/mongo/client.rb:226:in `new'
                  from /Users/gjm/10gen/mongo-ruby-driver/lib/mongo/client.rb:226:in `create_from_uri'
                  from /Users/gjm/10gen/mongo-ruby-driver/lib/mongo/client.rb:116:in `initialize'
                  from issues/uri_db.rb:22:in `new'
                  from issues/uri_db.rb:22:in `<main>'

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              durran.jordan Durran Jordan
              Reporter:
              gjmurakami Gary Murakami
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: