Add "require 'mongo'" rather than "require 'mongo/connection'" #137

Closed
ibc opened this Issue Sep 6, 2012 · 0 comments

Projects

None yet

2 participants

@ibc
ibc commented Sep 6, 2012

File lib/mongo.rb does:

begin
  require "mongo/connection"
rescue LoadError => error
  raise "Missing EM-Synchrony dependency: gem install mongo"
end

It causes an error:

NameError: uninitialized constant Mongo::Logging
        from /var/lib/gems/1.9.1/gems/mongo-1.7.0/lib/mongo/connection.rb:26:in `<class:Connection>'
        from /var/lib/gems/1.9.1/gems/mongo-1.7.0/lib/mongo/connection.rb:25:in `<module:Mongo>'
        from /var/lib/gems/1.9.1/gems/mongo-1.7.0/lib/mongo/connection.rb:22:in `<top (required)>'

Instead load "mongo" itself and rake spec works.

@igrigorik igrigorik added a commit that closed this issue Sep 6, 2012
@igrigorik require mongo, fixes #137 ed76f2a
@igrigorik igrigorik closed this in ed76f2a Sep 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment