Maher4Ever / wdm

Windows Directory Monitor (WDM) is a threaded directories monitor for Windows.
https://rubygems.org/gems/wdm
MIT License
50 stars 14 forks source link

Unable to install on Ruby 1.9.3 #13

Open jamlen opened 11 years ago

jamlen commented 11 years ago

Attempting to install wdm to get Guard working on Windows but get this even though I do have the Ruby DevKit installed:

Installing wdm (0.1.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    C:/Ruby193/bin/ruby.exe extconf.rb
checking for main() in -lkernel32... *** 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=C:/Ruby193/bin/ruby
        --with-kernel32lib
        --without-kernel32lib
C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:845:in `block in have_library'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
        from C:/Ruby193/lib/ruby/1.9.1/mkmf.rb:840:in `have_library'
        from extconf.rb:19:in `<main>'

Gem files will remain installed in c:/src/gems/ruby/1.9.1/gems/wdm-0.1.0 for inspection.
Results logged to c:/src/gems/ruby/1.9.1/gems/wdm-0.1.0/ext/wdm/gem_make.out
An error occurred while installing wdm (0.1.0), and Bundler cannot continue.
Make sure that `gem install wdm -v '0.1.0'` succeeds before bundling.

DevKit installation verified using instructions on the wiki:

c:\src>ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect"
[42]
jarmo commented 10 years ago

I have the exact same problem on Ruby 2.0.0p247. Any ideas what might be wrong here?

jarmo commented 10 years ago

Deleting devkit, downloading newer (correct version) of it and reinstalling it with --force option did the trick.

34db-eagles commented 10 years ago

I am having the same problem with ruby 2.0.0p247 and I have the latest version of devkit, currently unable to download & install wdm. Where is the force option? Or where do I use it?

jarmo commented 10 years ago

Force option is for installing devkit again.