Mongo::ConfigurationError

54 views
Skip to first unread message

Asaxena

unread,
Jan 16, 2011, 7:10:54 AM1/16/11
to DataMapper MongoDB Adapter
I am getting this error while attempting to use this adapter.

Mongo::ConfigurationError: Trying to connect directly to slave; if
this is what you want, specify :slave_ok => true.
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/mongo-0.18.3/lib/
mongo/connection.rb:317:in `block in connect_to_master'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/mongo-0.18.3/lib/
mongo/connection.rb:303:in `each'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/mongo-0.18.3/lib/
mongo/connection.rb:303:in `connect_to_master'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/mongo-0.18.3/lib/
mongo/connection.rb:121:in `initialize'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/dm-mongo-
adapter-0.2.0.pre3/lib/mongo_adapter/adapter.rb:249:in `new'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/dm-mongo-
adapter-0.2.0.pre3/lib/mongo_adapter/adapter.rb:249:in `connection'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/dm-mongo-
adapter-0.2.0.pre3/lib/mongo_adapter/adapter.rb:227:in `database'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/dm-mongo-
adapter-0.2.0.pre3/lib/mongo_adapter/adapter.rb:208:in
`with_collection'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/dm-mongo-
adapter-0.2.0.pre3/lib/mongo_adapter/adapter.rb:39:in `read'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/dm-core-0.10.2/lib/
dm-core/repository.rb:145:in `read'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/dm-core-0.10.2/lib/
dm-core/model.rb:353:in `last'
from (irb):1
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/
rails/commands/console.rb:44:in `start'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/
rails/commands/console.rb:8:in `start'
from /home/abhishiv/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/
rails/commands.rb:23:in `<top (required)>'
from script/rails:6:in `require'

Anyone has an idea why? Using it with mongohq
DataMapper.setup :default, "mongo://xxx:x...@flame.mongohq.com:xx/
app40xxx9"

In Gemfile

dm-mongo-adapter (0.2.0.pre3)
dm-aggregates (~> 0.10.2)
dm-core (~> 0.10.2)
mongo (~> 0.18.3)
mongo_ext (~> 0.18.3)

Btw seems like developments in this is stalled. Is it true? DM with
mongo makes so much sense because of the ability to have cross
database relationships.

solnic

unread,
Jan 17, 2011, 6:05:21 AM1/17/11
to DataMapper MongoDB Adapter
Hey!

It's possible that the current pre-release is broken. Development on
the adapter has slowed down lately, true, but it hadn't stopped! We
are releasing DataMapper 1.1 in the upcoming weeks and I will upgrade
the adapter to the latest version of DM and fix any known issues.

Cheers

# solnic

Asaxena

unread,
Jan 17, 2011, 10:24:00 AM1/17/11
to DataMapper MongoDB Adapter
hey

thanks for your reply. i think the issue is that mongohq uses version
1.6 which isnt compatible with the ruby mongo driver currently being
used in the adapter.

Perfect, I'll for it and try to fix it when i have time.
Reply all
Reply to author
Forward
0 new messages