问题描述
我试图通过捆绑包在Windows 7上安装gem EventMachine(使用Ruby 1.9.2和RubyInstaller),但是我得到以下错误。我也安装了DevKit,它工作正常,但我仍然无法弄清楚问题所在:
安装eventmachine(0.12 .10)与本地扩展C:/Ruby192/lib/ruby/site_ruby/1.9
中从C:/ Ruby192 / bin / bundle:19:
.1 / rubygems / installer.rb:551:in`在build_extensions中的块中救援:错误:未能bu $ b $宝石本地扩展。 (Gem :: Installer :: ExtensionBuildError)
C:/Ruby192/bin/ruby.exe extconf.rb
检查ruby.h中的rb_trap_immediate,rubysig.h ... no
检查rb_thread_blocking_region()...是
在sys / inotify.h中检查inotify_init()... no
检查sys / syscall.h中的__NR_inotify_init ... no
在sys / uio.h中检查writev()... no
检查rb_thread_check_ints()... yes
检查rb_time_new()... yes
检查窗口.h ...是
检查winsock.h ...是
检查main()in -lkernel32 ...是
检查main()in -lrpcrt4 ...是
在-lgdi32中检查main()...是
在-lssl中检查main()... no
创建Makefile
make
C:/ Ruby192 / bin / ruby -eputs'EXPORTS','Init_rubyeventmachine'> rubyeventmachine-i386-
mingw32.def
g ++ -I。 -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I / C / Ruby192 / include / ruby-1.9.1 / ruby /
落后-I / C / Ruby192 / include / ruby- 1.9.1 -I。 -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_RE
GION -DHAVE_TBR -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H
-DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_MAKE_PAIR -O3 -g -Wextra -Wno未使用的参数 -
WNO - 括号 - Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-
long -o binder.o -c binder.cpp
在project.h中包含的文件中:137:0 ,
从binder.cpp:20:
binder.h:35:34:warning:在函数返回类型
上忽略类型限定符在project.h中包含的文件中:138:0,
from binder.cpp:20:
em.h:91:47:warning:函数返回类型忽略了类型限定符
em.h:92:76:warning:在函数上忽略了类型限定符返回类型
em.h:93:56:warning:在函数返回类型
上忽略类型限定符em.h:95:57:warning:在函数返回类型
em上忽略类型限定符。 h:96:60:警告:在函数返回类型
em上忽略了类型限定符。 h:97:58:警告:在函数返回类型
上忽略类型限定符返回类型
em.h:99:36:警告:在函数返回类型
em.h:101:47上警告:忽略类型限定符返回类型
em.h:106:42:warning:在函数上忽略类型限定符返回类型
em.h:123:45:警告:函数返回类型忽略了类型限定符
em.h:132:36:warning:函数返回类型忽略了类型限定符
在项目中包含的文件.h:145:0,
从binder.cpp:20:
eventmachine.h:45:61:warning:在函数返回类型
上忽略了类型限定符eventmachine.h:46:112 :警告:类型限定符忽略函数返回类型
eventmachine.h:47:69:警告:类型限定符忽略函数返回类型
eventmachine.h:49:73:警告:类型限定符在函数上被忽略返回类型
eventmachine.h:62:75:warning:忽略类型限定符函数返回类型
eventmachine.h:63:74:warning:在函数返回类型中忽略类型限定符
eventmachine.h:64:77:warning:在函数返回类型中忽略类型限定符
eventmachine .h:65:41:警告:在函数返回类型
上忽略类型限定符在project.h中包含的文件中:145:0,从binder.cpp中获得
:20:
eventmachine.h :99:60:警告:类型限定符在函数返回类型
上被忽略eventmachine.h:100:58:warning:在函数返回类型中忽略类型限定符
eventmachine.h:102:60:warning:type限定符忽略函数返回类型
eventmachine.h:105:41:warning:在函数返回类型
g ++ -I上忽略类型限定符。 -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I / C / Ruby192 / include / ruby-1.9.1 / ruby /
落后-I / C / Ruby192 / include / ruby- 1.9.1 -I。 -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_RE
GION -DHAVE_TBR -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H
-DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_MAKE_PAIR -O3 -g -Wextra -Wno未使用的参数 -
WNO - 括号 - Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-
long -o cmain.o -c cmain.cpp
在project.h中包含的文件中:137:0 ,
from cmain.cpp:20:
binder.h:35:34:warning:在函数返回类型中忽略类型限定符
在project.h中包含的文件中:138:0,
from cmain.cpp:20:
em.h:91:47:warning:在函数返回类型中忽略类型限定符
em.h:92:76:warning:在函数上忽略类型限定符返回类型
em.h:93:56:warning:在函数返回类型
上忽略类型限定符em.h:95:57:warning:在函数返回类型
em上忽略类型限定符。 h:96:60:警告:在函数返回类型
em.h:97上忽略类型限定符:58:警告:类型限定符忽略函数返回类型
em.h:98:55:警告:类型限定符忽略函数返回类型
em.h:99:36:警告:忽略类型限定符on函数返回类型
em.h:101:47:warning:在函数返回类型中忽略类型限定符
em.h:106:42:warning:在函数返回类型中忽略类型限定符
警告:在函数返回类型
上忽略类型限定符。em.h:132:36:警告:在函数返回类型
上忽略类型限定符在project.h中包含的文件中:警告:在函数返回类型
eventmachine.h中忽略类型限定符:46:112:警告:在函数返回类型
eventmachine.h:47:69:warning时忽略类型限定符:在函数返回类型
eventmachine.h:49:73:warning:类型限定符忽略的类型限定符返回类型
eventmachine.h:62:75:warning:在函数上忽略类型限定符离子返回类型
eventmachine.h:63:74:warning:在函数返回类型中忽略类型限定符
eventmachine.h:64:77:warning:在函数返回类型中忽略类型限定符
eventmachine .h:65:41:警告:在函数返回类型
上忽略了类型限定符在project.h中包含的文件中:145:0,cmain.cpp中的
:20:
eventmachine.h :99:60:警告:类型限定符在函数返回类型
上被忽略eventmachine.h:100:58:warning:在函数返回类型中忽略类型限定符
eventmachine.h:102:60:warning:type在函数返回类型
eventmachine.h中忽略限定符:警告:在函数返回类型中忽略类型限定符
cmain.cpp:98:71:warning:在函数返回类型中忽略类型限定符
cmain.cpp:109:122:警告:在函数返回类型
上忽略类型限定符cmain.cpp:119:79:警告:在函数返回类型
上忽略类型限定符cmain.cpp:129: 83:警告:函数上忽略了类型限定符返回类型
cmain.cpp:260:85:警告:在函数返回类型
上忽略类型限定符cmain.cpp:270:84:警告:在函数返回类型
cmain上忽略类型限定符。警告:在函数返回类型
上忽略类型限定符cmain.cpp:290:51:警告:在函数返回类型
上忽略类型限定符cmain.cpp:300:70:warning:在函数返回类型
上忽略类型限定符cmain.cpp:320:55:警告:在函数返回类型
上忽略类型限定符cmain.cpp:546:70:警告:在函数上忽略类型限定符返回类型
cmain.cpp:669:68:警告:在函数返回类型
上忽略类型限定符cmain.cpp:函数'int evma_send_file_data_to_connection(long unsigned int,const cha
r *)':
cmain.cpp:752:6:错误:无法将参数'2'的'stat *'转换为'_stati64 *'为'int _fs
tati64(int,_stati64 *)'
make: *** [cmain.o]错误1
Gem文件将保持安装在C:/ Ruby192 / lib / ruby / gems / 1.9.1 / gems / eventmachine-0.12.1
0进行检查。
结果记录到C:/Ruby192/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.ou
t
从C:/ Ruby192 / lib /ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in`block in bu
ild_extensions'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/ installer.rb:504:在'each'中
从C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:504:在`build_exten
sions'
从C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:在`install'中
从C:/Ruby192/lib/ruby/gems/1.9.1/gems /bundler-1.0.15/lib/bundler/source.rb:101:
in`block in install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler -1.0.15 / lib / bundler / rubygems_integ
ration.rb:78:在`preserve_paths'
从C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0。 15 / lib / bundler / source.rb:91:i
n从C安装
:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/ bundler / installer.rb:5
8:in `块中(2级)运行'
从C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integ
ration.rb: 93:在`with_build_args'$ C $ / bubb $ C中:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:5
7:in `block in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12
:in`block在每个'
从C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12
:在`each'$来自C的b $ b:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12
:在每个中
从C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:4
9:在`run'中
从C:/ Ruby192 / lib / ruby / gems / 1.9.1 / gems / bundler-1.0.15 / lib / bundler / installer.rb:8
:在`install'
从C:/ Ruby192 / lib / ruby / gems / 1.9.1 / gems / bundler-1.0.15 / lib / bundler / cli.rb:222:in
`install'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/ta
sk.rb:22:在`run'中
从C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/in
vocation.rb:118:in`invoke_task'
从C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb
:246:在`dispatch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/ba
se.rb:389:in`start'
从C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/bin/bundle:13:在< top(re
quired)>'
从C:/ Ruby192 / bin / bundle:19:在< main>'
非常感谢!
解决方案EventMachine 0.12.10已知在Windows上不适用于Ruby 1.9.2。
请尝试最新的1.x预发布版本:
gem in档案eventmachine --pre
如果您使用Thin,最新版的Thin可以正常使用。
这已在 RubyInstaller小组 a>几次。
I am trying to install the gem EventMachine on Windows 7 (using Ruby 1.9.2 with RubyInstaller) via bundle, but I get the following error. I also installed DevKit and it is working, but I still can't figure out what the problem is:
Installing eventmachine (0.12.10) with native extensions C:/Ruby192/lib/ruby/site_ruby/1.9 .1/rubygems/installer.rb:551:in `rescue in block in build_extensions': ERROR: Failed to bu ild gem native extension. (Gem::Installer::ExtensionBuildError) C:/Ruby192/bin/ruby.exe extconf.rb 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_thread_check_ints()... yes 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 C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_rubyeventmachine'" > rubyeventmachine-i386- mingw32.def g++ -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/ backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_RE GION -DHAVE_TBR -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H -DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_MAKE_PAIR -O3 -g -Wextra -Wno-unused-parameter - Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long- long -o binder.o -c binder.cpp In file included from project.h:137:0, from binder.cpp:20: binder.h:35:34: warning: type qualifiers ignored on function return type In file included from project.h:138:0, from binder.cpp:20: em.h:91:47: warning: type qualifiers ignored on function return type em.h:92:76: warning: type qualifiers ignored on function return type em.h:93:56: warning: type qualifiers ignored on function return type em.h:95:57: warning: type qualifiers ignored on function return type em.h:96:60: warning: type qualifiers ignored on function return type em.h:97:58: warning: type qualifiers ignored on function return type em.h:98:55: warning: type qualifiers ignored on function return type em.h:99:36: warning: type qualifiers ignored on function return type em.h:101:47: warning: type qualifiers ignored on function return type em.h:106:42: warning: type qualifiers ignored on function return type em.h:123:45: warning: type qualifiers ignored on function return type em.h:132:36: warning: type qualifiers ignored on function return type In file included from project.h:145:0, from binder.cpp:20: eventmachine.h:45:61: warning: type qualifiers ignored on function return type eventmachine.h:46:112: warning: type qualifiers ignored on function return type eventmachine.h:47:69: warning: type qualifiers ignored on function return type eventmachine.h:49:73: warning: type qualifiers ignored on function return type eventmachine.h:62:75: warning: type qualifiers ignored on function return type eventmachine.h:63:74: warning: type qualifiers ignored on function return type eventmachine.h:64:77: warning: type qualifiers ignored on function return type eventmachine.h:65:41: warning: type qualifiers ignored on function return type In file included from project.h:145:0, from binder.cpp:20: eventmachine.h:99:60: warning: type qualifiers ignored on function return type eventmachine.h:100:58: warning: type qualifiers ignored on function return type eventmachine.h:102:60: warning: type qualifiers ignored on function return type eventmachine.h:105:41: warning: type qualifiers ignored on function return type g++ -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/ backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_RE GION -DHAVE_TBR -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_WIN32 -DHAVE_WINDOWS_H -DHAVE_WINSOCK_H -DWITHOUT_SSL -DHAVE_MAKE_PAIR -O3 -g -Wextra -Wno-unused-parameter - Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long- long -o cmain.o -c cmain.cpp In file included from project.h:137:0, from cmain.cpp:20: binder.h:35:34: warning: type qualifiers ignored on function return type In file included from project.h:138:0, from cmain.cpp:20: em.h:91:47: warning: type qualifiers ignored on function return type em.h:92:76: warning: type qualifiers ignored on function return type em.h:93:56: warning: type qualifiers ignored on function return type em.h:95:57: warning: type qualifiers ignored on function return type em.h:96:60: warning: type qualifiers ignored on function return type em.h:97:58: warning: type qualifiers ignored on function return type em.h:98:55: warning: type qualifiers ignored on function return type em.h:99:36: warning: type qualifiers ignored on function return type em.h:101:47: warning: type qualifiers ignored on function return type em.h:106:42: warning: type qualifiers ignored on function return type em.h:123:45: warning: type qualifiers ignored on function return type em.h:132:36: warning: type qualifiers ignored on function return type In file included from project.h:145:0, from cmain.cpp:20: eventmachine.h:45:61: warning: type qualifiers ignored on function return type eventmachine.h:46:112: warning: type qualifiers ignored on function return type eventmachine.h:47:69: warning: type qualifiers ignored on function return type eventmachine.h:49:73: warning: type qualifiers ignored on function return type eventmachine.h:62:75: warning: type qualifiers ignored on function return type eventmachine.h:63:74: warning: type qualifiers ignored on function return type eventmachine.h:64:77: warning: type qualifiers ignored on function return type eventmachine.h:65:41: warning: type qualifiers ignored on function return type In file included from project.h:145:0, from cmain.cpp:20: eventmachine.h:99:60: warning: type qualifiers ignored on function return type eventmachine.h:100:58: warning: type qualifiers ignored on function return type eventmachine.h:102:60: warning: type qualifiers ignored on function return type eventmachine.h:105:41: warning: type qualifiers ignored on function return type cmain.cpp:98:71: warning: type qualifiers ignored on function return type cmain.cpp:109:122: warning: type qualifiers ignored on function return type cmain.cpp:119:79: warning: type qualifiers ignored on function return type cmain.cpp:129:83: warning: type qualifiers ignored on function return type cmain.cpp:260:85: warning: type qualifiers ignored on function return type cmain.cpp:270:84: warning: type qualifiers ignored on function return type cmain.cpp:280:88: warning: type qualifiers ignored on function return type cmain.cpp:290:51: warning: type qualifiers ignored on function return type cmain.cpp:300:70: warning: type qualifiers ignored on function return type cmain.cpp:320:55: warning: type qualifiers ignored on function return type cmain.cpp:546:70: warning: type qualifiers ignored on function return type cmain.cpp:669:68: warning: type qualifiers ignored on function return type cmain.cpp: In function 'int evma_send_file_data_to_connection(long unsigned int, const cha r*)': cmain.cpp:752:6: error: cannot convert 'stat*' to '_stati64*' for argument '2' to 'int _fs tati64(int, _stati64*)' make: *** [cmain.o] Error 1 Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.1 0 for inspection. Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.ou t from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in `block in bu ild_extensions' from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:504:in `each' from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:504:in `build_exten sions' from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in `install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/source.rb:101: in `block in install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integ ration.rb:78:in `preserve_paths' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/source.rb:91:i n `install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:5 8:in `block (2 levels) in run' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integ ration.rb:93:in `with_build_args' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:5 7:in `block in run' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12 :in `block in each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12 :in `each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12 :in `each' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:4 9:in `run' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:8 :in `install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/ta sk.rb:22:in `run' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/in vocation.rb:118:in `invoke_task' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb :246:in `dispatch' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/ba se.rb:389:in `start' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/bin/bundle:13:in `<top (re quired)>' from C:/Ruby192/bin/bundle:19:in `load' from C:/Ruby192/bin/bundle:19:in `<main>'
Thanks a lot in advance!
解决方案EventMachine 0.12.10 is known to not work under Ruby 1.9.2 on Windows.
Please try latest 1.x pre-release versions:
gem install eventmachine --pre
If you're using with Thin, latest version of Thin works with it properly.
This has been discussed on RubyInstaller group several times.
这篇关于Ruby:在Windows 7下安装EventMachine的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!