Mongoid dependency problems

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

/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 ./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: