Skip to content

Unknown option "upsert" in development #46

@xaviershay

Description

@xaviershay

I followed the dev instructions on OSX sierra, using brew install mongo to get v3.4.1. I get the following failure when trying to go through setup:

2017-01-10 16:52:40 - Mongo::OperationFailure - Database command 'update' failed: Unknown option to update command: upsert:
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/db.rb:610:in `rescue in command'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/db.rb:606:in `command'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/collection_writer.rb:314:in `block in send_write_command'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/functional/logging.rb:55:in `block in instrument'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/functional/logging.rb:20:in `instrument'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/functional/logging.rb:54:in `instrument'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/collection_writer.rb:313:in `send_write_command'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/collection.rb:1104:in `send_write'
	/Users/xavier/.gem/ruby/2.3.1/gems/mongo-1.12.5/lib/mongo/collection.rb:497:in `update'
	/Users/xavier/Development/pagerbot/lib/admin/admin_server.rb:77:in `block in <class:AdminPage>'

This is confusing since 3.4.1 version of mongo definitely supports this command. In prod (on heroku) I'm running 3.2.11, so maybe that's a problem. I guess I can go and find an older version to install.

I noticed that version of the mongo gem is way behind head (2.4.1), so tried upgrading it. That causes other errors – I can try working through them to fix if someone thinks that would help. I can't find a changelog for that gem though.

So I have some more things I can try but before I go chasing rabbits wanted to check if anyone else seen this or have some likely hypotheses as to the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions