# Failed to build the native extension

**URL:** <https://rubytalk.org/t/failed-to-build-the-native-extension/58423>\
**Category:** ruby-talk\
**Created:** [6 May 2010 07:26 UTC](https://rubytalk.org/t/failed-to-build-the-native-extension/58423 "2010-05-06T07:26:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mengjiang\_Liu](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@Mengjiang\_Liu](https://rubytalk.org/u/Mengjiang_Liu)\
**Post date:** [6 May 2010 07:26 UTC](https://rubytalk.org/t/failed-to-build-the-native-extension/58423/1 "2010-05-06T07:26:06Z")

</div>

I used ruby-1.8.7-p249-i386-mingw32.7z on the windows 7 x64, and have  
installed the devkit. But it failed to build the native extension of  
eventmachine with error message as follow:

H:\study\fybjy\myoa\>gem install eventmachine  
Building native extensions. This could take a while...  
ERROR: Error installing eventmachine:  
&nbsp;&nbsp;ERROR: Failed to build gem native extension.

H:/ruby/bin/ruby.exe extconf.rb  
checking for rb\_trap\_immediate in ruby.h,rubysig.h... yes  
checking for rb\_thread\_blocking\_region()... no  
checking for inotify\_init() in sys/inotify.h... no  
checking for \_\_NR\_inotify\_init in sys/syscall.h... no  
checking for writev() in sys/uio.h... no  
checking for rb\_thread\_check\_ints()... no  
checking for rb\_time\_new()... yes  
checking for windows.h... yes  
checking for winsock.h... yes  
checking for main() in -lkernel32... yes  
checking for main() in -lrpcrt4... yes  
checking for main() in -lgdi32... yes  
checking for main() in -lssl... no  
creating Makefile

make  
MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.  
Fatal: 'ruby.h' does not exist - don't know how to make it

Gem files will remain installed in  
H:/ruby/lib/ruby/gems/1.8/gems/eventmachine-0.12.10 for inspection.  
Results logged to  
H:/ruby/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/ext/gem\_make.out

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Luis\_Lavena1](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Lavena1](https://rubytalk.org/u/Luis_Lavena1)\
**Post date:** [6 May 2010 12:40 UTC](https://rubytalk.org/t/failed-to-build-the-native-extension/58423/2 "2010-05-06T12:40:06Z")

</div>

[http://wiki.github.com/oneclick/rubyinstaller/troubleshooting](http://wiki.github.com/oneclick/rubyinstaller/troubleshooting)

> **···**
>
> On May 6, 4:26 am, mengjiang Liu \<liumengji...@gmail.com\> wrote:
> 
> > I used ruby-1.8.7-p249-i386-mingw32.7z on the windows 7 x64, and have  
> > installed the devkit. But it failed to build the native extension of  
> > eventmachine with error message as follow:
> > 
> > H:\study\fybjy\myoa\>gem install eventmachine  
> > Building native extensions. This could take a while...  
> > ERROR: Error installing eventmachine:  
> > ERROR: Failed to build gem native extension.
> > 
> > H:/ruby/bin/ruby.exe extconf.rb  
> > checking for rb\_trap\_immediate in ruby.h,rubysig.h... yes  
> > checking for rb\_thread\_blocking\_region()... no  
> > checking for inotify\_init() in sys/inotify.h... no  
> > checking for \_\_NR\_inotify\_init in sys/syscall.h... no  
> > checking for writev() in sys/uio.h... no  
> > checking for rb\_thread\_check\_ints()... no  
> > checking for rb\_time\_new()... yes  
> > checking for windows.h... yes  
> > checking for winsock.h... yes  
> > checking for main() in -lkernel32... yes  
> > checking for main() in -lrpcrt4... yes  
> > checking for main() in -lgdi32... yes  
> > checking for main() in -lssl... no  
> > creating Makefile
> > 
> > make  
> > MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp.  
> > Fatal: 'ruby.h' does not exist - don't know how to make it
> 
> --  
> Luis Lavena
