Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown option "upsert" in development #46

Closed
xaviershay opened this issue Jan 11, 2017 · 5 comments
Closed

Unknown option "upsert" in development #46

xaviershay opened this issue Jan 11, 2017 · 5 comments

Comments

@xaviershay
Copy link
Contributor

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?

@macobo
Copy link
Contributor

macobo commented Jan 11, 2017

Thanks for looking into this!

I was just debugging this last night - seems we don't support mongo 3 fully. I'm currently working towards a new release after a while and gonna patch that within this week. 👍

@xaviershay
Copy link
Contributor Author

amazing, thank you!

@macobo
Copy link
Contributor

macobo commented Jan 12, 2017

Update on this: The latest master should have fixed all remaining issues on this.

I'm currently working towards a new release, will close the issue after 0.4.

@unicornzero
Copy link

@xaviershay I'm running into this same error on Sierra and I'm not using pagerbot. I, too, am running Sierra with Mongo 3.4.1 and have code that worked against mongo 3.2.1 that is generating these errors against 3.4.1. This Github issue is the first reference I've found to someone else having the same problem, if you run across another reference somewhere, would you please let me know?

@macobo
Copy link
Contributor

macobo commented Jan 18, 2017

@xaviershay Updating the ruby mongo gem fixed this issue: 69ebc44 671fcad 29fd7b2

@macobo macobo closed this as completed Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants