无法在Windows上安装guard-livereload

时间:2013-04-26 19:51:56

标签: ruby gem guard

我正在运行 Windows 8 并尝试安装gem install guard-livereload

  • Windows 8 64BIT
  • Ruby 200-x64
  • Ruby DebKit 64位

我一直收到错误

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
generating rubyeventmachine-x64-mingw32.def
compiling binder.cpp
cc1plus.exe: warning: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus.exe: warning: command line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++ [enabled by default]
In file included from binder.cpp:20:0:
project.h:26:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
In file included from project.h:149:0,
                 from binder.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
In file included from c:\ruby200-x64\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:\ruby200-x64\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:150:0,
                 from binder.cpp:20:
em.h:84:47: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:85:76: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:86:56: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:88:57: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:89:60: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:90:58: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:91:36: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:93:47: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:99:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:116:45: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:125:36: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
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]
In file included from project.h:154:0,
                 from binder.cpp:20:
eventmachine.h: At global scope:
eventmachine.h:46:61: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:47:112: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:48:69: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:50:73: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:65:75: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:66:74: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:67:77: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:68:41: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
In file included from project.h:154:0,
                 from binder.cpp:20:
eventmachine.h:103:58: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:105:60: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:108:41: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
make: *** [binder.o] Error 1

EDIT 运行 gem install eventmachine --pre

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
generating rubyeventmachine-x64-mingw32.def
compiling binder.cpp
cc1plus.exe: warning: command line option '-Wdeclaration-after-statement' is valid for C/ObjC but not for C++ [enabled by default]
cc1plus.exe: warning: command line option '-Wimplicit-function-declaration' is valid for C/ObjC but not for C++ [enabled by default]
In file included from binder.cpp:20:0:
project.h:26:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
In file included from project.h:149:0,
                 from binder.cpp:20:
binder.h:35:34: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
In file included from c:\ruby200-x64\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:\ruby200-x64\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:150:0,
                 from binder.cpp:20:
em.h:84:47: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:85:76: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:86:56: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:88:57: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:89:60: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:90:58: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:91:36: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:93:47: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:99:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:116:45: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
em.h:125:36: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
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]
In file included from project.h:154:0,
                 from binder.cpp:20:
eventmachine.h: At global scope:
eventmachine.h:46:61: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:47:112: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:48:69: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:50:73: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:65:75: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:66:74: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:67:77: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:68:41: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
In file included from project.h:154:0,
                 from binder.cpp:20:
eventmachine.h:103:58: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:105:60: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
eventmachine.h:108:41: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
make: *** [binder.o] Error 1

1 个答案:

答案 0 :(得分:1)

更新

根据this issue,eventmachine无法在ruby 2.0(x64和x32)中编译。我可以运行guard-livereload的唯一环境是Ruby 1.9.3,现在使用tdm-32-4.5.2 DevKit。

安装后

$ gem install guard guard-livereload wdm

应该做的工作。


我很久以前在1.9.2成功建立了后卫和后卫。 你需要一些像win32console这样的宝石。