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

Unix sockets don't work in 1.11.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.11.1
    • Fix Version/s: 1.12
    • Component/s: Public API
    • Labels:
      None
    • Environment:
      Irrelevant

      Description

      Mongo::MongoClient.new("/var/run/mongodb.sock")

      Produces:

      ArgumentError: wrong number of arguments (0 for 2)
              from /home/tomas/.rvm/gems/ruby-2.0.0-p576@kvantel_toolkit/gems/mongo-1.11.1/lib/mongo/connection/socket/tcp_socket.rb:53:in `connect'
              from /home/tomas/.rvm/gems/ruby-2.0.0-p576@kvantel_toolkit/gems/mongo-1.11.1/lib/mongo/connection/socket/unix_socket.rb:36:in `initialize'
              from /home/tomas/.rvm/gems/ruby-2.0.0-p576@kvantel_toolkit/gems/mongo-1.11.1/lib/mongo/mongo_client.rb:544:in `new'
              from /home/tomas/.rvm/gems/ruby-2.0.0-p576@kvantel_toolkit/gems/mongo-1.11.1/lib/mongo/mongo_client.rb:544:in `check_is_master'
              from /home/tomas/.rvm/gems/ruby-2.0.0-p576@kvantel_toolkit/gems/mongo-1.11.1/lib/mongo/mongo_client.rb:400:in `connect'
              from /home/tomas/.rvm/gems/ruby-2.0.0-p576@kvantel_toolkit/gems/mongo-1.11.1/lib/mongo/mongo_client.rb:661:in `setup'
              from /home/tomas/.rvm/gems/ruby-2.0.0-p576@kvantel_toolkit/gems/mongo-1.11.1/lib/mongo/mongo_client.rb:177:in `initialize'
              from (irb):3:in `new'
              from (irb):3
              from /home/tomas/.rvm/rubies/ruby-2.0.0-p576/bin/irb:12:in `<main>'

      UnixSocket#initialize erroneously calls TcpSocket#connect with no arguments.

      Github: unix_socket:36
      Github: tcp_socket:53

        Attachments

          Activity

            People

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            Hubro Tomas Sandven [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: