17

I can't seem to install kgio with my app, every time I do bundle install. I get this error ! Can anyone help me? I have tried re bundling like 5 times already.

C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
    checking for CLOCK_MONOTONIC in time.h... no
    checking for CLOCK_MONOTONIC() in time.h... no
    checking for clockid_t in time.h... no
    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:/RailsInstaller/Ruby1.9.3/bin/ruby
        --with-rtlib
        --without-rtlib
        --with-nsllib
        --without-nsllib
        --with-socketlib
        --without-socketlib
  • You can just skip kgio on Windows then, see this answer http://stackoverflow.com/questions/10764199/develop-on-windows-run-unicorn-in-production-on-heroku – Hoang Huynh Feb 05 '15 at 16:08

2 Answers2

26

Actually, the answer is that you can't use kgio with windows. I spent 3 hours sweating through the other answer here before finding that out. Kgio needs a unix-like environment according to it's developer.

tomcat23
  • 510
  • 5
  • 8
  • Yes Ya, you are absolutely right, I moved to Linux at work for the same reason. Good luck ! –  Mar 17 '13 at 15:02
9

You are probably missing required libraries.

Also from RubyInstaller Wiki

This failure is due to the native gem compile/install process using a version of libiconv-2.dll other than the one integrated into the DevKit due to how Windows searches for DLLs

This can be worked around by searching your computer for the file libiconv-2.dll and renaming, deleting, or otherwise moving any found instances out of the way and re-running the native gem install process or in your case Bundle Install

It is recommended that if you don’t know why or what put the libiconv-2.dll file in the directory in which you found it, that you move it back after you compile whatever gems you need. This will possibly prevent other applications from breaking.

EDIT:

The kgio gem only builds and runs on Unix like systems (http://bogomips.org/kgio/) It uses functions which are not natively available on Windows.

If you are trying to use Unicorn, then you just need to replace the webserver.

Give Thin a try. Add the following lines to your Gemfile:

gem 'thin'
Sam
  • 1,205
  • 1
  • 21
  • 39
Wasi
  • 1,258
  • 4
  • 14
  • 33
  • It doesn't let me do 'bundle install' because it says you need to have mentioned .dll fine. Please Help ! –  Jan 23 '13 at 15:59