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
317 stars 82 forks source link

mongify cannot install in windows #139

Closed nklt closed 7 years ago

nklt commented 7 years ago

Installing mongify in Windows 7 result in the error during part of the installation:

ruby version

f:\apps\Ruby24-x64\bin\ruby.exe --version ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]

the error shown is

>f:\apps\Ruby24-x64\bin\gem.cmd install mongify
Fetching: i18n-0.8.4.gem (100%)
Successfully installed i18n-0.8.4
Fetching: thread_safe-0.3.6.gem (100%)
Successfully installed thread_safe-0.3.6
Fetching: tzinfo-1.2.3.gem (100%)
Successfully installed tzinfo-1.2.3
Fetching: activesupport-4.2.8.gem (100%)
Successfully installed activesupport-4.2.8
Fetching: builder-3.2.3.gem (100%)
Successfully installed builder-3.2.3
Fetching: activemodel-4.2.8.gem (100%)
Successfully installed activemodel-4.2.8
Fetching: arel-6.0.4.gem (100%)
Successfully installed arel-6.0.4
Fetching: activerecord-4.2.8.gem (100%)
Successfully installed activerecord-4.2.8
Fetching: bson-1.12.5.gem (100%)
Successfully installed bson-1.12.5
Fetching: mongo-1.12.5.gem (100%)
Successfully installed mongo-1.12.5
Fetching: bson_ext-1.12.5.gem (100%)
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions.  This could take a while...
ERROR:  Error installing mongify:
        ERROR: Failed to build gem native extension.

    current directory: F:/apps/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bson_ext-1.12.5/ext/cbson
F:/apps/Ruby24-x64/bin/ruby.exe -r ./siteconf20170606-2628-1dl3lqt.rb extconf.rb
checking for asprintf()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=F:/apps/Ruby24-x64/bin/$(RUBY_BASE_NAME)
F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:542:in `try_link0'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:557:in `try_link'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:768:in `try_func'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:1055:in `block in have_func'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:945:in `block in checking_for'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:321:in `open'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:321:in `open'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:347:in `postpone'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:944:in `checking_for'
        from F:/apps/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:1054:in `have_func'
        from extconf.rb:3:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  F:/apps/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/bson_ext-1.12.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in F:/apps/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bson_ext-1.12.5 for inspection.
Results logged to F:/apps/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/bson_ext-1.12.5/gem_make.out

any help would be appreciated.

anlek commented 7 years ago

Hey, it seems you're missing developer tools on from your install, you can download them here: https://rubyinstaller.org/downloads/ (just at the bottom left side of the screen under "DEVELOPMENT KIT"). Good luck!