anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
315 stars 81 forks source link

bson conflict #97

Closed pascalroget closed 7 years ago

pascalroget commented 8 years ago

Hi,

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:2007:in `raise_if_conflicts': Unable to activate bson_ext-1.12.5, because bson-4.1.1 conflicts with bson (~> 1.12.5) (Gem::LoadError)

mongo depends on bson > 4.0

jctr073 commented 8 years ago

upgrading to ruby 2.3.0 fixed this for me.

anlek commented 8 years ago

Interesting, I haven't tested on older versions of Ruby as I usually use Ruby 2.3. If I have some time I'll give ruby 2.0 a test.

pascalroget commented 8 years ago

bash-3.2$ gem install mongify [...] 13 gems installed bash-3.2$ mongify /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:2007:in raise_if_conflicts': Unable to activate bson_ext-1.12.5, because bson-4.1.1 conflicts with bson (~> 1.12.5) (Gem::LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1176:inactivate' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1212:in block in activate_dependencies' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:ineach' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in activate_dependencies' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1180:inactivate' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:48:in gem' from /usr/local/bin/mongify:22:in

' bash-3.2$ ruby -v ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] bash-3.2$ echo ":-(" :-(

anlek commented 8 years ago

try uninstalling bson-4.1.1 (gem uninstall bson) and see if that helps.

pascalroget commented 8 years ago
sudo gem uninstall bson
Password:

Select gem to uninstall:
 1. bson-1.12.5
 2. bson-4.1.1
 3. All versions
> 2

You have requested to uninstall the gem:
    bson-4.1.1

mongo-2.2.5 depends on bson (~> 4.0)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Successfully uninstalled bson-4.1.1

>mongify

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'bson' (~> 4.0) - did find: [bson-1.12.5] (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1209:in `block in activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1180:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1212:in `block in activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `activate_dependencies'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1180:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:48:in `gem'
    from /usr/local/bin/mongify:22:in `<main>'
anlek commented 8 years ago

Ok, so try to uninstall bson_ext and bson and then just install gem install bson (so it installs latest version).

pascalroget commented 8 years ago

Same result.

This is what gets installed

bson 4.1.1 [rdoc] [www] Ruby Implementation of the BSON specification

bson_ext 1.12.5 [rdoc] [www] - depends on bson. C extensions for Ruby BSON.

bson 1.12.5 [rdoc] [www] Ruby implementation of BSON Executables are b2json, j2bson.

mongify 1.3.0 [rdoc] [www] - depends on activerecord, activesupport, bson, bson_ext, cucumber, highline, jazz_fingers, mocha, mongo, mysql2, pg, rake, rspec, rspec-collection_matchers, sqlite3, watchr, yard. Translate your SQL data to MongoDB with ease Executable is mongify.