Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/157.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ EventMachine gem解决方案导致缺少dll文件ruby错误,Windows 7_C++_Windows 7_Ruby On Rails 3.1_Gem_Eventmachine - Fatal编程技术网

C++ EventMachine gem解决方案导致缺少dll文件ruby错误,Windows 7

C++ EventMachine gem解决方案导致缺少dll文件ruby错误,Windows 7,c++,windows-7,ruby-on-rails-3.1,gem,eventmachine,C++,Windows 7,Ruby On Rails 3.1,Gem,Eventmachine,克隆我的第一个Rails 3.1.1应用程序后,我的第一个捆绑包安装在eventmachine 0.12.10 gem上受阻。(我运行的是32位Windows 7) 我也在使用gem'thin' 我发现这个帖子也有同样的问题 我将其与GEM文件中的这一行集成: gem "eventmachine", ">= 1.0.0.beta" 这允许bundle安装运行,但当我启动rails服务器时,我会看到一个Ruby弹出窗口,标题为Ruby.exe-System Error和文本 The pr

克隆我的第一个Rails 3.1.1应用程序后,我的第一个捆绑包安装在eventmachine 0.12.10 gem上受阻。(我运行的是32位Windows 7)

我也在使用gem'thin'

我发现这个帖子也有同样的问题

我将其与GEM文件中的这一行集成:

gem "eventmachine", ">= 1.0.0.beta"
这允许bundle安装运行,但当我启动rails服务器时,我会看到一个Ruby弹出窗口,标题为Ruby.exe-System Error和文本

The program can't start because libgcc_s_sjlj-1.dll is missing from your computer.  Try reinstalling the program to fix this problem.
单击“确定”后,我在控制台中收到此消息

Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
然后是一个长堆栈跟踪(请求查看您是否认为这会有所帮助)

我看到EngEngEngEt需要一个C++编译器。我在32位Windows 7计算机上重新安装了MinGW,并将MinGW\bin添加到路径变量中

但是,当我查看bin文件夹时,文件libgcc_s_sjlj-1.dll不在那里,相同的错误消息仍然存在。我发现了这个关于2009年缺少那个文件夹的帖子,但我真的不知道该怎么办


谢谢您能给我的任何帮助。

将此添加到您的gem文件中

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

还要注意,如果切换回基于unix的操作系统,则必须使用
1.0.0.beta.4

,这可能是因为eventmachine动态链接到mingw DLL

你可以:

require 'devkit'
在脚本的顶部。这将临时增强您的路径与mingw devkit的路径


我通过添加

require "em/pure_ruby"
在config/application.rb中


希望这能有所帮助。

换句话说,只需执行
gem'eventmachine',“>=1.0.0.beta.4”,“欢迎来到windows/linux兼容性地狱!这些开源工具不是为Windows设计的。根据我的经验,当你解决了这个问题,你只会遇到另一个问题,直到你放弃为止。我已经经历过了。我建议一个附带的解决方案:在windows机器上运行虚拟化linux。这是我使用的,它工作得很好,你很容易得到,一切都立即工作。