mongoid3 Questions

5

Solved

I am talking to multiple databases using Mongoid.override_database("database_name") using Mongoid with rails. How do I find the current database programmatically? Mongoid docs on sessions: http:/...
Polytrophic asked 23/10, 2012 at 21:15

6

Solved

I've created a Rails Mountable App and added 'mongoid' and 'rspec' gem's. If I try to run my specs now I get the following error: Mongoid::Errors::NoSessionConfig: Problem: No configuration coul...
Gardner asked 12/3, 2013 at 6:43

2

Solved

I have two databases that I have to use in my application. I have the following in my mongoid.yml: development: # Configure available database sessions. (required) sessions: # Defines the defau...
Appalachian asked 6/5, 2013 at 14:4

2

Solved

I had to forcefully shutdown my Ubuntu system after it got hanged. Now I get this error while trying to run my Rails app. Moped::Errors::ConnectionFailure (Could not connect to any secondary or pr...
Inset asked 12/8, 2013 at 5:31

4

I'm playing with a standalone ruby application and can't configure Mongoid 3.0.13 to work. I've run across a couple example apps that have configuration blocks like: Mongoid::Config.instance.fro...
Renner asked 7/3, 2013 at 23:34

2

Solved

I want all of my db interactions for a specific model to go through the mongo primary in my cluster, so I set the model to use strong consistency. class Photo include Mongoid::Document with cons...
Fireweed asked 8/10, 2015 at 4:27

4

Solved

I have a collection called artists, i'd like to rename it to artist_lookups. How do I do this?
Scum asked 22/8, 2012 at 20:23

0

I am trying to save files into gridfs using carrierwave mongoid in rails. I am unable to do this process due to this error: BSON::Binary::InvalidType ("my file content" is not a valid binary type....
Stauder asked 3/12, 2014 at 5:37

1

Solved

Trying to install mongoid 3.1.6 in rails 4.1 Bundler could not find compatible versions for gem "activemodel": In Gemfile: mongoid (~> 3.1.6) ruby depends on activemodel (~> 3.2) ruby ra...
Epiphysis asked 11/4, 2014 at 18:53

1

Solved

It seems like Mongoid is now the superior ORM for Mongo based on performance and development activity. Unfortunately, we're on MongoMapper and need to migrate. Are there any concerns or stumbling ...
Accretion asked 30/12, 2013 at 23:11

3

Solved

I'm using Mongoid (v3) to access MongoDB, and want to perform this action: db.sessionlogs.update( {sessionid: '12345'}, /* selection criteria */ {'$push':{rows: "new set of data"}}, /* modifica...
Hardin asked 18/7, 2012 at 17:39

4

Solved

Trying to use will_paginate gem. My Gem file has: gem 'will_paginate', '~> 3.0.0' My orders_controllers.rb: def index @orders = Order.all.paginate(:page => params[:page], :per_page =&gt...
Contortionist asked 10/6, 2013 at 8:41

2

Solved

I have a rails app using Mongoid 3 running on Heroku. I've just updated it to use Unicorn. When I try to deploy it to Heroku I get the following error : Running: rake assets:precompile rake aborte...

1

Solved

Just as the title suggests. I am not able to find anything related to Mongoid 3. The things I found only apply to old versions of mongoid that didn't use Moped. I found this and it doesn't work: ...
Borrell asked 27/6, 2013 at 10:17

1

I am creating a test application using following versions of rails, ruby and mongoid. rails 4 beta ruby 2.0.0 mongoid 3.1.2 My GemFile looks like this gem 'rails', '4.0.0.beta1' ruby '2.0.0' ge...
Astto asked 19/3, 2013 at 23:47

1

Solved

I am trying to update an attribute from a record in my Mongo collection, but the new value isn't being saved. a = GraphEngine::UserPlace.where(place_id:5000000701039).first a.place_id = 5000000257...
Vasques asked 20/12, 2012 at 19:18

2

Solved

I'm writing a map/reduce operation with Mongoid 3.0. I'm trying to use the print statement to debug the JS functions. This is a troubleshooting suggestion from the MongoDB docs, e.g.: reduce = %Q{...
Bonnette asked 20/12, 2012 at 0:27

2

Solved

How to do an intersection or overlap query in mongo shell - what circles overlap my search region? Within relate only to the center position but doesn't include radius of the other circles in searc...
Stygian asked 15/10, 2012 at 8:55
1

© 2022 - 2024 — McMap. All rights reserved.