1

I am trying to install middleman in windows 8.1. I pretty much followed this post: How to debug Middleman 3 gem installation issues on Windows.

I ran the executable rubyinstaller-2.0.0-p481.exe. I installed it at C:\Ruby200. Then I installed devkit (DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe). I extracted it at C:\Ruby200\devkit. I openend a terminal, went to C:\Ruby200\devkit. Ran the command ruby dk.rb init and thenruby dk.rb install. Everything worked as expected. Then I installed middleman version 3.1.5 with the command:gem install middleman -v 3.1.5. It returned without any error messages. Then I went to C:\Users\a-user\a-project and ran middleman init a-site. It showed an error message:

Could not find gem 'wdm (~> 0.1.0) x86-mingw32' in the gems available on this machine. Run bundle install to install missing gems.

So I ran bundle install. It installed many gems, but ended with an error message:

DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.3.2
Using i18n 0.6.11
Installing json 1.8.1
Installing minitest 5.4.0
Installing thread_safe 0.3.4
Installing tzinfo 1.2.2
Installing activesupport 4.1.4
Using bundler 1.7.0
Installing timers 1.1.0
Installing celluloid 0.15.2
Using chunky_png 1.3.1
Using coffee-script-source 1.7.1
Installing execjs 2.2.1
Installing coffee-script 2.3.0
Using multi_json 1.10.1
Installing sass 3.3.14
Installing compass-core 1.0.0.rc.1
Installing compass-import-once 1.0.4
Using rb-fsevent 0.9.4
Using ffi 1.9.3
Using rb-inotify 0.9.5
Installing compass 1.0.0.rc.0
Installing eventmachine 1.0.3
Installing http_parser.rb 0.6.0
Installing em-websocket 0.5.1
Installing erubis 2.7.0
Installing faker 1.4.2
Installing tilt 1.4.1
Using haml 4.0.5
Using hike 1.2.3
Installing uber 0.0.8
Installing hooks 0.4.0
Installing httpclient 2.4.0

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

C:/Ruby200/bin/ruby.exe -r ./siteconf20140819-4868-14ihtz1.rb extconf.rb
checking for CLOCK_MONOTONIC in time.h... yes
checking for clockid_t in time.h... yes
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no getaddrinfo required
*** 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:/Ruby200/bin/ruby
        --with-rtlib
        --without-rtlib
        --with-nsllib
        --without-nsllib
        --with-socketlib
        --without-socketlib

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-2.9.2 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/kgio-2.9.2/gem_make.out
An error occurred while installing kgio (2.9.2), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.9.2'` succeeds before bundling.

And this in the log gem_make.out:

C:/Ruby200/bin/ruby.exe -r ./siteconf20140819-4868-14ihtz1.rb extconf.rb 
checking for CLOCK_MONOTONIC in time.h... yes
checking for clockid_t in time.h... yes
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** 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:/Ruby200/bin/ruby
    --with-rtlib
    --without-rtlib
    --with-nsllib
    --without-nsllib
    --with-socketlib
    --without-socketlib

extconf failed, exit code 1

I think that I don't need kgio, but I don't know how to make bundle install get rid of that.

I also tried the latest ruby, devkit and middleman version and it also failed. I tried other versions as well. And it all end up failing in something related to native extensions.

Community
  • 1
  • 1
Carlos Nunes
  • 1,929
  • 2
  • 16
  • 20
  • getaddrinfo required seems to imply kgio isn't windows friendly somehow? maybe the authors need this? http://stackoverflow.com/questions/12765743/getaddrinfo-on-win32 – rogerdpack Aug 19 '14 at 21:43
  • same case here http://stackoverflow.com/questions/25303719/error-in-install-bundler-while-installing-ruby-gems-on-windows-machine – Manojkumar Aug 20 '14 at 17:10

0 Answers0