Skip to content

Commit

Permalink
minor: load same version on mongo_ext
Browse files Browse the repository at this point in the history
  • Loading branch information
banker committed Dec 2, 2009
1 parent 6cfae57 commit 2af5aa1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mongo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module Mongo
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
Expand All @@ -21,7 +22,7 @@ module Mongo
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'
Expand All @@ -42,3 +43,4 @@ module Mongo
require 'mongo/cursor'
require 'mongo/collection'
require 'mongo/admin'

0 comments on commit 2af5aa1

Please sign in to comment.