# Failed to build the native extension

**URL:** <https://www.ruby-forum.com/t/failed-to-build-the-native-extension/188127>\
**Category:** Ruby\
**Created:** [May 6, 2010, 9:26am UTC](https://www.ruby-forum.com/t/failed-to-build-the-native-extension/188127 "2010-05-06T09:26:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![limux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9de0a6/32.png) [@limux](https://www.ruby-forum.com/u/limux)\
**Post date:** [May 6, 2010, 9:26am UTC](https://www.ruby-forum.com/t/failed-to-build-the-native-extension/188127/1 "2010-05-06T09:26:04Z")

</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:  
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 © 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

---

<div class="post-metadata">

**Author:** ![limux](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9de0a6/32.png) [@limux](https://www.ruby-forum.com/u/limux)\
**Post date:** [May 6, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/failed-to-build-the-native-extension/188127/2 "2010-05-06T14:41:20Z")

</div>

On May 6, 4:26 am, mengjiang Liu [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> checking for rb\_trap\_immediate in ruby.h,rubysig.h… 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

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