1.6.0RC1 bson is not picking up the jruby version

I have a rails 3 application that uses mongodb via mongoid. In 1.5.6,
bundle install correctly picks up the jruby version of bson. In
1.6.RC1, it is trying to build bson_ext.

Using bson (1.2.0)
Installing bson_ext (1.2.0) with native extensions
uby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions’:
ERROR: Failed
to build gem native extension. (Gem::Installer::ExtensionBuildError)

The Gemfile has:
gem ‘mongoid’, ‘2.0.0.beta.20’
if defined?(JRUBY_VERSION)
gem ‘jruby-openssl’
gem ‘bson’

Is there some way to force bundler to use the jruby compatible bson
version? I have it installed.

gem list -->
bson (1.2.0 jruby)

Scott M.

Do you happen to have bson_ext called out somewhere else in the Gemfile?
I’ve been running 1.6.0RC1, Rails 3, and mongoid without any trouble for
couple of weeks.

Here are the relevant gems in my Gemfile:
gem ‘rails’, ‘3.0.3’
gem “mongoid”, “2.0.0.rc.5”

I don’t call out bson or bson_ext. I definitely don’t want bson_ext
that’s the native extension; bson comes for free since mongoid specifies
as a dependence.


Thanks for your response. Pulling out the bson line worked. But I
tried putting it back in to cause it to fail again and I couldn’t make
bundle install fail (after Gemfile.lock was deleted). I know
switching back and forth (Windows pik) between 1.5.6 and 1.6.0rc1 was
failing - multiple times. I’m sorry I don’t have a repeatable bug to

Thanks for replying.

Scott M.