mongohq

Mongoid 3 + Heroku (MongoHQ) cause Moped::Errors::OperationFailure

怎甘沉沦 提交于 2019-12-03 03:32:34
问题 With Rails 3, after upgrading from Mongoid 2.x to Mongoid 3.x, my Heroku + MongoHQ setup stopped working. Funny thing is, that my development & test frameworks and my whole test suite passes just fine. I suspect the problem is with my mongoid.yml file, but I've tried searching the docs, google & stackoverflow, and used all the suggested formats, including this: heroku mongohq and mongoid Mongo::ConnectionFailure or actually this: https://gist.github.com/2900804 UPDATED July 16th: This is how

Mongoid 3 + Heroku (MongoHQ) cause Moped::Errors::OperationFailure

China☆狼群 提交于 2019-12-02 17:03:24
With Rails 3, after upgrading from Mongoid 2.x to Mongoid 3.x, my Heroku + MongoHQ setup stopped working. Funny thing is, that my development & test frameworks and my whole test suite passes just fine. I suspect the problem is with my mongoid.yml file, but I've tried searching the docs, google & stackoverflow, and used all the suggested formats, including this: heroku mongohq and mongoid Mongo::ConnectionFailure or actually this: https://gist.github.com/2900804 UPDATED July 16th: This is how my mongoid.yml file looks, after trying multiple things + After what Jason from MongoHQ suggested :

MongoDB won't connect to MongoHQ using Mongoid

旧城冷巷雨未停 提交于 2019-12-01 21:43:34
I've just started a brand new rails project and the first task I'm trying to complete is creating an object and having it save within my database. I went through the automated way of generating an object, in this case a URL object as follows: rails generate scaffold Url domain:string I've also tested out two separate mongoid.yml configuration settings. The first is as follows: development: sessions: default: # Defines the name of the default database that Mongoid can connect to. # (required). uri: mongodb://[username]:[password]@flame.mongohq.com:27046/[database] options: consistency: :strong

JavaScript execution failed connected to mongoHQ shell

为君一笑 提交于 2019-12-01 14:49:04
问题 Trying to access MongoHQ directly: > mongo mongodb://heroku:mypassword@alex.mongohq.com:10046/myapp MongoDB shell version: 2.4.3 connecting to: mongodb://heroku:mypassword@alex.mongohq.com:10046/myapp Tue Jun 4 16:10:09.255 Assertion failure _setName.size() src/mongo/client/dbclientinterface.h 211 0x10017116b 0x100135396 0x100068356 0x100129bab 0x10010f92f 0x10024b2fa 0x139ba3a06362 0x139ba3a0ce93 0x139ba3a400c9 0x139ba3a0c76e 0 mongo 0x000000010017116b _ZN5mongo15printStackTraceERSo + 43 1

strange mongodb and mongoose error: not master and slaveOk=false error

蹲街弑〆低调 提交于 2019-11-29 15:59:33
问题 I'm getting a strange error in my node.js app not master and slaveOk=false code 13435 I'm doing a findOne query using mongoose 4.0.2 hitting a mongodb 3.0.1. The query was working earlier today. What is this error? I'm running on mongohq on their standard per gb plan. 回答1: That means you're trying to read from a secondary node in a replica set, you can only read from the primary node by default. You can allow a secondary node to accept reads by running rs.slaveOk() in a mongo shell that is

heroku mongohq and mongoid Mongo::ConnectionFailure

早过忘川 提交于 2019-11-28 18:52:24
UPDATE 9th june 2012: Setup with mongoid 3.0.0.rc at heroku, see this gist: https://gist.github.com/2900804 UPDATE 22th jan 2011: Uri now takes precedence in mongoid.yml https://github.com/mongoid/mongoid/issues/issue/266 UPDATE 12th aug 2010: Although I got an accepted answer 6th may from Jackues Crocker, there are aspects of this issue that makes it easy to mess up! It happened to me yet again and I decided to research the mongoid source code. So, here it goes: Currently, host: port: name/database: settings TAKE PRECEDENCE OVER the uri: setting. Hence, the awfully uninformative error message

mongodb could not connect to server

大兔子大兔子 提交于 2019-11-28 02:03:53
问题 I'm new to MongoDB. I'm trying to connect to my remote mongo database from my work machine( I tried for both mongohq as well as mongolab). I'm getting the error listed below. When I run the same command from my home machine it runs fine and does connect to remove mongo database. I'm not sure what is messed up on my work machine but I'd like to fix it. Thanks for you help. MongoDB shell version: 2.4.9 connecting to: linus.mongohq.com:10097/mydb Thu Jan 16 04:16:02.689 Error: couldn't connect

heroku mongohq and mongoid Mongo::ConnectionFailure

可紊 提交于 2019-11-27 11:43:35
问题 UPDATE 9th june 2012: Setup with mongoid 3.0.0.rc at heroku, see this gist: https://gist.github.com/2900804 UPDATE 22th jan 2011: Uri now takes precedence in mongoid.yml https://github.com/mongoid/mongoid/issues/issue/266 UPDATE 12th aug 2010: Although I got an accepted answer 6th may from Jackues Crocker, there are aspects of this issue that makes it easy to mess up! It happened to me yet again and I decided to research the mongoid source code. So, here it goes: Currently, host: port: name