Question

Using ruby v 1.9.3p448 I get a failed to build gem native extension error, but it seems to be using Ruby 2.0.0

I'm new to ruby and am just trying to run this program https://github.com/propublica/qis

This is the notes from the aptana 3 terminal:

minh@WIN7VM1 ~/Documents/Aptana3Space/qis (master)
$ ruby -v
ruby 1.9.3p448 (2013-06-27) [i386-mingw32]

minh@WIN7VM1 ~/Documents/Aptana3Space/qis (master)
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using daemons (1.1.9)
Installing eventmachine (1.0.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    c:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for main() in -lssl... no
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
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_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... 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
creating Makefile

make "DESTDIR="
generating rubyeventmachine-x64-mingw32.def
compiling binder.cpp
In file included from c:\users\minh\downloads\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/process.h:12:0,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby/win32.h:60,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby/defines.h:153,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby/ruby.h:70,
                 from c:/Ruby200-x64/include/ruby-2.0.0/ruby.h:33,
                 from em.h:24,
                 from project.h:150,
                 from binder.cpp:20:
c:\users\minh\downloads\devkit\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/sys/types.h:68:16: error: conflicting declaration 'typedef _pid_
t pid_t'
In file included from binder.cpp:20:0:
project.h:97:13: error: 'pid_t' has a previous declaration as 'typedef int pid_t'
In file included from project.h:151:0,
                 from binder.cpp:20:
ed.h: In member function 'void EventableDescriptor::SetSocketInvalid()':
ed.h:43:40: warning: overflow in implicit constant conversion [-Woverflow]
make: *** [binder.o] Error 1


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

minh@WIN7VM1 ~/Documents/Aptana3Space/qis (master)
$

And this is the notes from the cmd.exe terminal

Directory of C:\Users\minh\Documents\Aptana3Space\qis
07/17/2013  02:28 PM    <DIR>          .
07/17/2013  02:28 PM    <DIR>          ..
07/17/2013  02:28 PM                47 .gitignore
07/17/2013  02:28 PM               207 .project
07/17/2013  02:28 PM             2,277 app.rb
07/17/2013  02:28 PM                26 config.ru
07/17/2013  02:28 PM                89 Gemfile
07/17/2013  02:28 PM               559 Gemfile.lock
07/17/2013  02:28 PM               961 goog_geocoder.rb
07/17/2013  02:28 PM             2,224 README.md
07/17/2013  02:28 PM    <DIR>          views
           8 File(s)          6,390 bytes
           3 Dir(s)  514,066,120,704 bytes free

C:\Users\minh\Documents\Aptana3Space\qis>bundle install
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Co
    uld not find bundler (>= 0) amongst [bigdecimal-1.1.0, eventmachine-1.0.3-x86-mi
ngw32, io-console-0.3, json-1.5.5, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.5] (Ge
m::LoadError)
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `
to_spec'
    from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
    from C:/Ruby200-x64/bin/bundle:22:in `<main>'

C:\Users\minh\Documents\Aptana3Space\qis>
Was it helpful?

Solution

I guess you are missing openssl from your sysyem, install that.

lssl is marked no, it means openssl.

Event machine has following dependencies

  • OpenSSL
  • libstd++

and regular ones, ruby & rake.

Try it.

And with your updated question. I doubt if bundler gem is missing.

gem install bundler

And I don't know how openssl installation in Windows work, been long i lost connection with that part of the world. ;)

OTHER TIPS

You will most likely need the Ruby DevKit for windows to build extensions. Go to this website http://rubyinstaller.org/downloads/ and download the devkit appropriate for your system/install. Then follow the directions for installing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top