Windows ROR错误:无法生成gem本机扩展。(Gem::Installer::ExtensionBuildError)

Windows ROR错误:无法生成gem本机扩展。(Gem::Installer::ExtensionBuildError),windows,ruby-on-rails-3,Windows,Ruby On Rails 3,我正在尝试运行rails应用程序。我已经在我的计算机上安装了rails 3。。当尝试使用rails服务器命令运行它时,它要求我在命令提示符中键入“bundle install”: C:\Users\Webyana Tech\Desktop\Rails3\wy_editor>bundle install Fetching source index for http://rubygems.org/ Fetching source index for http://gems.github.co

我正在尝试运行rails应用程序。我已经在我的计算机上安装了rails 3。。当尝试使用rails服务器命令运行它时,它要求我在命令提示符中键入“bundle install”:

C:\Users\Webyana Tech\Desktop\Rails3\wy_editor>bundle install
Fetching source index for http://rubygems.org/

Fetching source index for http://gems.github.com/

Using rake (0.8.7)

Using ZenTest (4.5.0)

Using RubyInline (3.8.6)

Using abstract (1.0.0)

Using activesupport (3.0.0)

Using builder (2.1.2)

Using i18n (0.4.2)

Using activemodel (3.0.0)

Using erubis (2.6.6)

Using rack (1.2.2)

Using rack-mount (0.6.13)

Using rack-test (0.5.7)

Using tzinfo (0.3.25)

Using actionpack (3.0.0)

Using mime-types (1.16)

Using polyglot (0.3.1)

Using treetop (1.4.9)

Using mail (2.2.15)

Using actionmailer (3.0.0)

Using arel (1.0.1)

Using activerecord (3.0.0)

Using activeresource (3.0.0)

Using addressable (2.2.4)

Using crack (0.1.8)

Installing eventmachine (0.12.10) with native extensions C:/Ruby/lib/ruby/site_r
uby/1.9.1/rubygems/installer.rb:529:in `rescue in block in build_extensions': 
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)


        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/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_
BLOCKING_REGION -DHAVE_TBR -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_W
IN32 -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:
请帮帮我。。我试着用谷歌搜索这个。。但是找不到和上面一样的东西。。。我猜eventmachine无法安装

在执行“捆绑安装”时,我会收到与您相同的错误消息。目前,您必须单独安装“eventmachine”的旧版本。键入“gem安装eventmachine-v0.12.8”。它为我成功安装

@user662539:我确实成功安装了“eventmachine(0.12.8)”,但我仍然无法启动瘦服务器。我收到一条错误消息,提示“由于未找到msvcrt-ruby18.dll,此应用程序无法启动。重新安装应用程序可能会解决此问题。”。即使我将“msvcrt-ruby18.dll”从“\Ruby187\bin”复制到“\Ruby192\bin”,我也会收到另一条关于“分段错误”的错误消息

所以我将我的ruby版本恢复到ruby 1.8.7(2011-02-18 patchlevel 334)[i386-mingw32],并能够启动瘦服务器


很抱歉,我无法在这方面帮助您,但这些是我的新发现。

您缺少某种依赖性。我自己不是Windows用户…所以,我不确定缺少什么。是因为eventmachine没有正确安装吗?为什么不在ubuntu vm中安装它?它正在尝试构建/安装eventmachine,但失败了。建筑文档说可能需要
OpenSSL
libstd++
。我会考虑在Windows中安装类似的依赖项。Link:那么接下来应该做什么呢……我尝试使用上面的命令安装旧版本的eventmachine。。但是在尝试捆绑安装时出现了相同的错误。。我正在使用windows 7和ruby 1.9.2与rails 3,最后我可以在runy 1.9.2与rails 3中安装eventmachine(1.0.0.beta.2)。。所有的包都安装好了。。。但是当我尝试的时候