2013-07-18 93 views
0

使用Ruby v 1.9.3p448我得到一个失败打造宝石原生扩展的错误,但它似乎是使用Ruby 2.0.0红宝石EventMachine的失败打造宝石原生扩展

我是新来的红宝石和我只是试图运行此程序https://github.com/propublica/qis

这是从集锦3终端笔记:

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

[email protected] ~/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. 

[email protected] ~/Documents/Aptana3Space/qis (master) 
$ 

这是从cmd.exe的终端的音符

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> 
+0

我打开了SSL,安装了打包程序,下载了错误的DevKit,下载了正确的DevKit,现在它全部正常工作 – AlecPerkey

回答

3

我想你是从你的sysyem丢失openssl,安装它。

lssl被标记为否,意味着openssl。

事件该机具有以下依赖性

  • OpenSSL的
  • libstd ++

和定期的,红宝石&耙。

试试吧。

并与您更新的问题。我怀疑bundler gem是否丢失。

gem install bundler 

而且我不知道openssl如何在Windows安装工作,一直以来我都失去了与世界那个部分的连接。 ;)

+0

谢谢你会尝试更新:) – AlecPerkey

+0

我打开SSL,安装了打包程序,下载了错误的DevKit,下载了正确的DevKit,现在一切正常。 谢谢 – AlecPerkey

1

您很可能需要Ruby DevKit for windows来构建扩展。转到此网站http://rubyinstaller.org/downloads/并下载适合您的系统/安装的开发包。然后按照安装说明进行操作。

+0

谢谢 - 我安装了错误的一开始(较新的DevKits只适用于红宝石2.0或更新版本) – AlecPerkey