# Mongoid dependency problems

**URL:** <https://www.ruby-forum.com/t/mongoid-dependency-problems/194194>\
**Category:** Ruby\
**Created:** [August 31, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/mongoid-dependency-problems/194194 "2010-08-31T20:57:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stalkert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/46a35a/32.png) [@stalkert](https://www.ruby-forum.com/u/stalkert)\
**Post date:** [August 31, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/mongoid-dependency-problems/194194/1 "2010-08-31T20:57:35Z")

</div>

I’m new to Ruby and struggling to understand some dependency problems  
while trying to write a very basic script that uses Mongoid to write to  
a MongoDB. I’m not using Rails or anything, just a single Ruby script  
running from the shell.

In a nutshell, I’m running Ruby 1.8.7and have Rails 3.0.0 installed, and  
initiallly Mongoid 1.9.1 wanted activesupport \< 3.0.pre, so I upgraded  
to Mongoid 2.0.0.beta.17, and along with it to BSON 1.0.7. Now I get the  
following:

/opt/local/lib/ruby/site\_ruby/1.8/rubygems.rb:233:in `activate': can't activate bson (= 1.0.4, runtime) for ["mongoid-2.0.0.beta.17"], already activated bson-1.0.7 for ["mongo-1.0.7", "mongoid-2.0.0.beta.17"] (Gem::LoadError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate’  
from /opt/local/lib/ruby/site\_ruby/1.8/rubygems.rb:248:in `each' from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate’  
from  
/opt/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:35:in  
`require’  
from ./rubymongo.rb:4

So something is still activating BSON 1.0.4 somewhere? How do I track  
that down and resolve? All my little sample script does it require  
rubygems and mongoid right now.

Further details are also available on this StackOverflow thread:

> <https://stackoverflow.com/questions/3608640/mongoid-activesupport-version-problem>
