From 2af5aa1e385f9f4248f7bdf0faac67eaeab54e93 Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Wed, 2 Dec 2009 10:16:03 -0500 Subject: [PATCH] minor: load same version on mongo_ext --- lib/mongo.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mongo.rb b/lib/mongo.rb index 187f6e0..3ec1109 100644 --- a/lib/mongo.rb +++ b/lib/mongo.rb @@ -10,6 +10,7 @@ end begin # Need this for running test with and without c ext in Ruby 1.9. raise LoadError if ENV['TEST_MODE'] && !ENV['C_EXT'] + gem 'mongo_ext', "= #{Mongo::VERSION}" require 'mongo_ext/cbson' require 'mongo/util/bson_c' BSON = BSON_C @@ -21,7 +22,7 @@ begin warn "\n**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance." warn " You can install the extension as follows:\n gem install mongo_ext\n" warn " If you continue to receive this message after installing, make sure that the" - warn " mongo_ext gem is in your load path. This may mean requiring rubygems.\n" + warn " mongo_ext gem is in your load path and that the mongo_ext and mongo gems are of the same version.\n" end require 'mongo/types/binary' @@ -42,3 +43,4 @@ require 'mongo/db' require 'mongo/cursor' require 'mongo/collection' require 'mongo/admin' +