bcg / em-mongo

EventMachine MongoDB Driver (based off of RMongo)
http://github.com/bcg/em-mongo
141 stars 47 forks source link

require oddities in latest version #15

Closed adriaant closed 13 years ago

adriaant commented 13 years ago

There seems to be an issue with paths in the latest em-mongo gem. I get:

>> require 'eventmachine' #=> true
>> require 'em-synchrony' #=> true
>> require 'em-mongo'
LoadError: no such file to load -- eventmachine
    from <internal:lib/rubygems/custom_require>:33:in `require'
    from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /Users/adriaant/.rvm/gems/ruby-1.9.2-p0@birdgrinder/gems/em-mongo-0.3.2/lib/em-mongo.rb:7:in `ensure in <top (required)>'
    from /Users/adriaant/.rvm/gems/ruby-1.9.2-p0@birdgrinder/gems/em-mongo-0.3.2/lib/em-mongo.rb:8:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:33:in `require'
    from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from (irb):3
    from /Users/adriaant/.rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `<main>'

If I replace the first 13 lines with: require "eventmachine" require "bson"

then it works ok.

bcg commented 13 years ago

Ew. I guess my Bundler tests didn't quite work. I'm taking a look now. Thanks!

bcg commented 13 years ago

Ok should be resolved in 0.3.3. Sorry for the breakage.

adriaant commented 13 years ago

No problem at all! Thanks for the quick fix :)

adriaant commented 13 years ago

One minor thing. You forgoto to add: require 'eventmachine'

bcg commented 13 years ago

Fixed in 0.3.4. Embarrassing.

adriaant commented 13 years ago

Thanks :)