无法在Windows上安装瘦客户端

我不能在窗口上安装薄gem。 在构build本机扩展期间会发生某些事情。

有人遇到同样的问题吗?

这是堆栈跟踪:

>gem install thin --no-ri --no-rdoc Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing thin: ERROR: Failed to build gem native extension. C:/Ruby/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 g++ -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby/include/ruby-1.9.1/ruby/backward -I/C/Ru by/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THR EAD_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:/Ruby/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby/include/ruby-1.9.1/ruby/backward -I/C/Ru by/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THR EAD_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 char*)': cmain.cpp:752:6: error: cannot convert 'stat*' to '_stati64*' for argument '2' to 'int _fstati64(int , _stati64*)' make: *** [cmain.o] Error 1 Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10 for inspect ion. Results logged to C:/Ruby/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out 

从git或rubygems存储库安装不再适用(当前)在1.9.2或1.9.3下(2012年6月 – 22日证实仍然失效)。 相反,您只需要简单地:

 gem install eventmachine --pre gem install thin 

请注意,2012年6月 – 18日当前的预发布版本已更名为1.0.0.rc.1 ,因此有可能“即将”与Windows一起使用的版本将成为正式版本,这将不再是一个问题。


如果您尝试从github回购版中创build1.9.2以下的gem,您可能会看到以下内容(包含在search引擎中):

 C:\ eventmachine> rake build
 (在C:/ eventmachine中)
 cd分机
 C:/Ruby/bin/ruby.exe extconf.rb
检查ruby.h中的rb_trap_immediate,rubysig.h ... *** extconf.rb失败***
由于某种原因无法创buildMakefile,可能缺乏必要的
图书馆和/或标题。 检查mkmf.log文件以获取更多详细信息。

如果您尝试从rubygems repo 1.9.3下安装gem,您可能会看到这一点(包括search引擎点击):

  C:\> gem install eventmachine
暂时增强PATH以包括DevKit ...
构build本机扩展。 这可能需要一段时间...
错误:安装eventmachine时出错:
        错误:无法构buildgem本机扩展。

         C:/Ruby193/bin/ruby.exe extconf.rb
在ruby.h中检查rb_trap_immediate,rubysig.h ...不
检查rb_thread_blocking_region()...是的
在sys / inotify.h中检查inotify_init()...不
检查sys / syscall.h中的__NR_inotify_init ...否
在sys / uio.h中检查writev()...不
检查rb_thread_check_ints()...是的
检查rb_time_new()...是的
检查windows.h ...是的
检查winsock.h ...是的
在-lkernel32中检查main()...是的
检查main()in -lrpcrt4 ...是的
在-lgdi32中检查main()...是的
检查main()in -lssl ... no
创buildMakefile

使
生成rubyeventmachine-i386-mingw32.def
编译binder.cpp
 cc1plus.exe:警告:命令行选项“-Wdeclaration-after-statement”对C / ObjC有效,但不适用于C ++
 cc1plus.exe:警告:命令行选项“-Wimplicit-function-declaration”对C / ObjC有效,但不适用于C ++
在从binder.cpp包含的文件中:20:0:
 project.h:85:0:警告:重新定义“FD_SETSIZE”
 :0:0:注意:这是前一个定义的位置
在从project.h:137:0包含的文件中,
                 从binder.cpp:20:
 binder.h:35:34:警告:在函数返回types上忽略types限定符
在从project.h:138:0包含的文件中,
                 从binder.cpp:20:
 em.h:91:47:warning:在函数返回types上忽略types限定符
 em.h:92:76:警告:在函数返回types上忽略types限定符
 em.h:93:56:警告:在函数返回types上忽略types限定符
 em.h:95:57:警告:在函数返回types上忽略types限定符
 em.h:96:60:警告:在函数返回types上忽略types限定符
 em.h:97:58:警告:在函数返回types上忽略types限定符
警告:在函数返回types上忽略types限定符
 em.h:99:36:警告:在函数返回types上忽略types限定符
 em.h:101:47:警告:在函数返回types上忽略types限定符
 em.h:106:42:警告:函数返回types中忽略了types限定符
 em.h:123:45:警告:函数返回types上忽略了types限定符
 em.h:132:36:警告:在函数返回types上忽略types限定符
在project.h:145:0包含的文件中,
                 从binder.cpp:20:
 eventmachine.h:45:61:警告:在函数返回types上忽略types限定符
 eventmachine.h:46:112:警告:函数返回types上忽略了types限定符
 eventmachine.h:47:69:warning:在函数返回types上忽略了types限定符
 eventmachine.h:49:73:warning:在函数返回types上忽略了types限定符
 eventmachine.h:62:75:warning:在函数返回types上忽略types限定符
 eventmachine.h:63:74:警告:在函数返回types上忽略types限定符
 eventmachine.h:64:77:warning:在函数返回types上忽略了types限定符
 eventmachine.h:65:41:警告:函数返回types上忽略了types限定符
在project.h:145:0包含的文件中,
                 从binder.cpp:20:
 eventmachine.h:99:60:warning:在函数返回types上忽略了types限定符
 eventmachine.h:100:58:warning:在函数返回types上忽略了types限定符
 eventmachine.h:102:60:warning:在函数返回types上忽略了types限定符
 eventmachine.h:105:41:警告:在函数返回types上忽略types限定符
编译cmain.cpp
 cc1plus.exe:警告:命令行选项“-Wdeclaration-after-statement”对C / ObjC有效,但不适用于C ++
 cc1plus.exe:警告:命令行选项“-Wimplicit-function-declaration”对C / ObjC有效,但不适用于C ++
在从cmain.cpp包含的文件中:20:0:
 project.h:85:0:警告:重新定义“FD_SETSIZE”
 :0:0:注意:这是前一个定义的位置
在从project.h:137:0包含的文件中,
                 来自cmain.cpp:20:
 binder.h:35:34:警告:在函数返回types上忽略types限定符
在从project.h:138:0包含的文件中,
                 来自cmain.cpp:20:
 em.h:91:47:warning:在函数返回types上忽略types限定符
 em.h:92:76:警告:在函数返回types上忽略types限定符
 em.h:93:56:警告:在函数返回types上忽略types限定符
 em.h:95:57:警告:在函数返回types上忽略types限定符
 em.h:96:60:警告:在函数返回types上忽略types限定符
 em.h:97:58:警告:在函数返回types上忽略types限定符
警告:在函数返回types上忽略types限定符
 em.h:99:36:警告:在函数返回types上忽略types限定符
 em.h:101:47:警告:在函数返回types上忽略types限定符
 em.h:106:42:警告:函数返回types中忽略了types限定符
 em.h:123:45:警告:函数返回types上忽略了types限定符
 em.h:132:36:警告:在函数返回types上忽略types限定符
在project.h:145:0包含的文件中,
                 来自cmain.cpp:20:
 eventmachine.h:45:61:警告:在函数返回types上忽略types限定符
 eventmachine.h:46:112:警告:函数返回types上忽略了types限定符
 eventmachine.h:47:69:警告:在函数返回types上忽略types限定符
 eventmachine.h:49:73:warning:在函数返回types上忽略了types限定符
 eventmachine.h:62:75:warning:在函数返回types上忽略types限定符
 eventmachine.h:63:74:警告:在函数返回types上忽略types限定符
 eventmachine.h:64:77:warning:在函数返回types上忽略了types限定符
 eventmachine.h:65:41:警告:函数返回types上忽略了types限定符
在project.h:145:0包含的文件中,
                 来自cmain.cpp:20:
 eventmachine.h:99:60:warning:在函数返回types上忽略了types限定符
 eventmachine.h:100:58:warning:在函数返回types上忽略了types限定符
 eventmachine.h:102:60:warning:在函数返回types上忽略了types限定符
 eventmachine.h:105:41:警告:在函数返回types上忽略types限定符
 cmain.cpp:98:71:警告:types限定符在函数返回types上被忽略
 cmain.cpp:109:122:警告:在函数返回types上忽略types限定符
 cmain.cpp:119:79:警告:在函数返回types上忽略types限定符
 cmain.cpp:129:83:警告:在函数返回types上忽略types限定符
 cmain.cpp:260:85:警告:在函数返回types上忽略types限定符
 cmain.cpp:270:84:警告:函数返回types中忽略了types限定符
 cmain.cpp:280:88:警告:在函数返回types上忽略了types限定符
 cmain.cpp:290:51:警告:在函数返回types上忽略types限定符
 cmain.cpp:300:70:warning:在函数返回types上忽略types限定符
 cmain.cpp:320:55:警告:在函数返回types上忽略types限定符
 cmain.cpp:546:70:警告:在函数返回types上忽略types限定符
 cmain.cpp:669:68:警告:在函数返回types上忽略了types限定符
 cmain.cpp:在函数'int evma_send_file_data_to_connection(long unsigned int,const char *)'中:
 cmain.cpp:752:6:错误:无法将参数'2'的'stat *'转换为'_stati64 *'为'int _fstati64(int,_stati64 *)'
 make:*** [cmain.o]错误1


 Gem文件将保持安装在C:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10中进行检查。
logging到C:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out的结果 

首先,从RubyInstaller for Windows 网站安装DevKit(看起来你已经完成了)。

然后像Roger显示的那样从git仓库中单独安装eventmachine。

 > gem install specific_install Successfully installed backports-1.18.1 Successfully installed specific_install-0.2.3 2 gems installed ... > gem specific_install -l http://github.com/eventmachine/eventmachine.git git installing from http://github.com/eventmachine/eventmachine.git ... Successfully built RubyGem Name: eventmachine Version: 0.12.11 File: eventmachine-0.12.11.gem Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed eventmachine-0.12.11 1 gem installed ... successfully installed 

然后,你应该能够从gem中安装瘦。

 > gem install thin Temporarily enhancing PATH to include DevKit... Successfully installed thin-1.2.7-x86-mingw32 1 gem installed ... > thin start Using rack adapter Thin web server (v1.2.7 codename No Hup) Maximum connections set to 1024 Listening on 0.0.0.0:3000, CTRL+C to stop 

尝试运行以下

 gem install thin –ignore-dependencies 

如果重试安装rack和eventmachine失败,然后重新运行上述命令。

 gem install rack gem install eventmachine -l gem install thin –ignore-dependencies 

这将帮助你…

将下面这行添加到您的gem文件中

gem'eventmachine',::git =>'https://github.com/eventmachine/eventmachine.git'

然后运行软件包安装

这可能有助于:

 $ gem install specific_install $ gem specific_install -l http://github.com/eventmachine/eventmachine.git 

您可以安装Thin,无需使用预构build的二进制文件自行构build,但需要知道哪些二进制文件。 要获得最新的预build的win32版本,请执行以下操作:

  1. 转到RubyGems精简页面
  2. 请查看“版本”部分下的“x86-mswin32”版本。 (截至今天的版本1.2.11,1.2.10等都有win32二进制文件)
  3. 使用“-v”标志中包含的Thin版本运行以下“gem install”命令:

gem install thin -v 1.2.11

以下是我的安装结果:

 c:\> gem install thin -v 1.2.11
成功安装了thin-1.2.11-x86-mswin32
 1个gem安装
为thin-1.2.11-x86-mswin32安装ri文档... 
用3611类更新ri类caching... 
为thin-1.2.11-x86-mswin32安装RDoc文档...