简体   繁体   English

ROR错误:无法构建gem本机扩展。 (Gem :: Installer :: ExtensionBuildError)

[英]ROR ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

I am trying to run rails application. 我正在尝试运行Rails应用程序。 I have installed rails 3 on my computer.. When trying to run it using rails server command, it is asking me to type "bundle install" in the command prompt: 我已经在计算机上安装了rails3。当尝试使用rails server命令运行它时,它要求我在命令提示符下键入“ 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:

Please help me.. I tried googling for this.. But couldnt find anything which is same as above... I guess the eventmachine is failing to install... 请帮助我..我尝试使用谷歌搜索..但是找不到与上面相同的任何东西...我想eventmachine无法安装...

I'm having the exact error messages as yours when doing a "bundle install". 执行“捆绑安装”时,我收到的错误消息与您的完全一样。 For now you'll have to install an older version of "eventmachine", separately. 目前,您必须分别安装旧版本的“ eventmachine”。 Type "gem install eventmachine -v 0.12.8". 键入“ gem install eventmachine -v 0.12.8”。 It installed successfully for me. 它为我成功安装。

@user662539: Well, I did have " eventmachine (0.12.8) " installed successfully, but I'm still couldn't start thin server. @ user662539:好吧,我确实已经成功安装了“ eventmachine(0.12.8) ”,但是我仍然无法启动瘦服务器。 I got a error message prompting "This application has failed to start because msvcrt-ruby18.dll was not found. Re-installing the application may fix this problem." 我收到一条错误消息,提示“此应用程序未能启动,因为未找到msvcrt-ruby18.dll。重新安装该应用程序可能会解决此问题。” . Even if I copied over " msvcrt-ruby18.dll " from " \\Ruby187\\bin " to " \\Ruby192\\bin ", I got another error message regarding " Segmentation fault ". 即使我从“ \\ Ruby187 \\ bin ”复制“ msvcrt-ruby18.dll ”到“ \\ Ruby192 \\ bin ”, 也会收到有关“ Segmentation fault ”的另一条错误消息。

So I revert my ruby version back to ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32] and able to start thin server. 因此,我将Ruby版本恢复为Ruby 1.8.7(2011-02-18 patchlevel 334)[i386-mingw32],并能够启动瘦服务器。

Sorry I'm not able to help you on this one, but these my new findings. 抱歉,我无法在这一方面为您提供帮助,但是这些都是我的新发现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM