Bundler / eventmachine安装问题(Rails / Windows 8)

时间:2013-10-09 03:26:32

标签: ruby-on-rails ruby-on-rails-3 eventmachine

我正在尝试通过bundle在Windows 8(使用Ruby 1.9.3和RubyInstaller)上安装gem EventMachine,但是我收到以下错误。此处发布的所有先前解决方案均不适合我。我非常感谢提前任何帮助

   C:\Sites\routes_controller_exercise>bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.6)
Using builder (3.0.0)
Using activemodel (3.2.6)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.6)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.6)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.6)
Using activeresource (3.2.6)
Using bundler (1.3.5)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.3)
Using rdoc (3.12)
Using thor (0.15.3)
Using railties (3.2.6)
Using coffee-rails (3.2.2)
Using daemons (1.1.8)
Installing eventmachine (0.12.10)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

        C:/RailsInstaller/Ruby1.9.3/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
generating rubyeventmachine-i386-mingw32.def
compiling binder.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is val
id for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is v
alid for C/ObjC but not for C++
In file included from binder.cpp:20:0:
project.h:26:0: warning: ignoring #pragma warning
In file included from binder.cpp:20:0:
project.h:85:0: warning: "FD_SETSIZE" redefined
<command-line>:0:0: note: this is the location of the previous definition
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
compiling cmain.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is val
id for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is v
alid for C/ObjC but not for C++
In file included from cmain.cpp:20:0:
project.h:26:0: warning: ignoring #pragma warning
In file included from cmain.cpp:20:0:
project.h:85:0: warning: "FD_SETSIZE" redefined
<command-line>:0:0: note: this is the location of the previous definition
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: 'fstati64' was not declared in this scope
make: *** [cmain.o] Error 1


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/eventmachine-0.12.10 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/eventmach
ine-0.12.10/ext/gem_make.out
An error occurred while installing eventmachine (0.12.10), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling.


C:\Sites\routes_controller_exercise>ruby -v
ruby 1.9.3p429 (2013-05-15) [i386-mingw32]

2 个答案:

答案 0 :(得分:2)

你可以写你的Gemfile:

gem 'eventmachine', '~> 1.0.0.beta.4.1'

再次运行bundle install,如果你有一些关于你正在请求另一个eventmachine版本的错误,并且当前有一个bundle of eventmachine,你可以删除“Gemfile.lock”并再次运行bundle install(尽管这样做并不好,但它对我有用)

PD:我希望这个解决方案也适合你。

答案 1 :(得分:1)

确认上述答案有效。

首先,我强制它使用以下命令下载最新的eventmachine:

gem install eventmachine --pre

我将以下行添加到我的gemfile中:

gem 'eventmachine', '1.0.0', :platforms => [:mswin, :mingw]

然后使用以下行找到并编辑了我的gemfile.lock:

rake (10.1.0) #
## eventmachine (1.0.0)
eventmachine (1.0.0-x86-mingw32)

然后重新捆绑安装,一切都很顺利。希望这能帮到你!