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

Too many arguments (Mongo::MongoArgumentError)

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.1
    • Affects Version/s: 1.8.1
    • Component/s: None
    • None
    • Environment:
      Ruby 1.9.3, Mongoid 2.5.1, Rails 3.2.11

      Upgrading to the newest version of the mongo driver (1.8.1) I get the following exception when starting my Rails app:

      /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongo-1.8.1/lib/mongo/mongo_replica_set_client.rb:116:in `initialize': Too many arguments (Mongo::MongoArgumentError)
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongo-1.8.1/lib/mongo/legacy.rb:71:in `initialize'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config/replset_database.rb:22:in `new'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config/replset_database.rb:22:in `configure'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:288:in `configure_databases'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:305:in `block (2 levels) in configure_extras'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:304:in `tap'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:304:in `block in configure_extras'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:303:in `each'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:303:in `inject'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:303:in `configure_extras'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:112:in `from_hash'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:126:in `block in load!'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:125:in `tap'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/config.rb:125:in `load!'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid.rb:148:in `load!'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mongoid-2.5.1/lib/mongoid/railtie.rb:84:in `block in <class:Railtie>'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
      from /Users/fredrik/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'

        1. mongo.yml
          0.3 kB
        2. mongoid.yml
          0.6 kB

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            fbjork Fredrik Björk
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: