So I ran into a similar error trying to run 'bundle exec rspec spec' on my machine after installing mongodb with macports for my ruby application.
bash-3.2$ bundle exec rspec spec
**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance.
You can install the extension as follows:
gem install bson_ext
If you continue to receive this message after installing, make sure that the
bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.
/Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/tracelines19.rb:12:in `require': dlopen(/Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle, 9): Library not loaded: /Volumes/Users/barry/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib (LoadError)
Referenced from: /Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle
Reason: image not found - /Users/dtengdin/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13-x86_64-darwin-11/lib/trace_nums19.bundle
I can't say for sure if this will work for you but what I found was that the macports instillation of mongo somehow messed up my gem files and after installing mongo with brew and uninstalling and manually deleting the gem folders with the -x86_64-darwin-11... extension on them I could run my rspec and cucumber tests with a mongod server running.
This is my first post on Stack Overflow I hope this may help!