Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Which mongo docker image is the Dockerfile assumed to work with? #37

Open
tuhins opened this issue Jun 6, 2017 · 2 comments
Open

Which mongo docker image is the Dockerfile assumed to work with? #37

tuhins opened this issue Jun 6, 2017 · 2 comments

Comments

@tuhins
Copy link

tuhins commented Jun 6, 2017

The Dockerfile is otherwise downloading the latest docker image of mongo which is having some issues with mongomapper.

Mongo::OperationFailure - Database command 'insert' failed: Unknown option to insert command: w:
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/db.rb:564:in rescue in command' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/db.rb:560:in command'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/collection_writer.rb:314:in block in send_write_command' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/functional/logging.rb:55:in block in instrument'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/functional/logging.rb:20:in instrument' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/functional/logging.rb:54:in instrument'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/collection_writer.rb:313:in send_write_command' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/collection.rb:1091:in send_write'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo-1.11.1/lib/mongo/collection.rb:419:in insert' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/querying.rb:136:in save_to_collection'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/associations.rb:88:in save_to_collection' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/safe.rb:27:in save_to_collection'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/querying.rb:126:in create' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/callbacks.rb:21:in block in create'
/gaps/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:82:in run_callbacks' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/embedded_callbacks.rb:77:in run_callbacks'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/callbacks.rb:21:in create' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/querying.rb:121:in create_or_update'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/callbacks.rb:17:in block in create_or_update' /gaps/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:113:in call'
/gaps/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:113:in call' /gaps/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:in block in halting'
/gaps/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:in call' /gaps/vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:in run_callbacks'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/embedded_callbacks.rb:77:in run_callbacks' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/callbacks.rb:17:in create_or_update'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/querying.rb:103:in save' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/dirty.rb:17:in block in save'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/dirty.rb:27:in clear_changes' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/dirty.rb:17:in save'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/validations.rb:22:in save' /gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/identity_map.rb:87:in save'
/gaps/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/querying.rb:108:in save!' /gaps/lib/gaps/db/user.rb:169:in persist'

@Jarred-Sumner
Copy link

I think this issue is related to this mongomapper/mongomapper#651

@psbrandt
Copy link

I solved this by using Mongo 2.x. To do so, I edited the docker-compose.yml file as follows:

-    image: mongo
+    image: mongo:2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants