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

Comments

Projects
None yet
3 participants
@xaviershay
Contributor

xaviershay commented Jan 11, 2017

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

This comment has been minimized.

Show comment
Hide comment
@macobo

macobo Jan 11, 2017

Contributor

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. 👍

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

This comment has been minimized.

Show comment
Hide comment
@xaviershay

xaviershay Jan 11, 2017

Contributor

amazing, thank you!

Contributor

xaviershay commented Jan 11, 2017

amazing, thank you!

@macobo

This comment has been minimized.

Show comment
Hide comment
@macobo

macobo Jan 12, 2017

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@unicornzero

unicornzero Jan 18, 2017

@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?

unicornzero commented Jan 18, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@macobo

macobo Jan 18, 2017

Contributor

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

Contributor

macobo commented Jan 18, 2017

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

@macobo macobo closed this Feb 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment