Ruby 无法与 MS C 运行时链接 (msvcr90.dll)

发布于 2024-07-27 04:47:31 字数 2249 浏览 7 评论 0原文

当我尝试在 Windows/XP 上运行 Ruby Thin 演示应用程序时,我收到一个错误,Windows 无法找到 Ruby 1.8.7 的“msvcr90.dll”——我找到了一个可再发行组件,并将其放入我要面对的路径中信息如下:

"R6034 ... application has made an attempt to lead the C runtime incorrectly"

今天早些时候,我运行了一些 eventmachine 演示,一切正常,所以我认为问题出在 Thin 上。

Ruby 堆栈转储没有那么有用......(包括在下面)。 有治疗方法吗?

我查看了其他 MSVCR90.DLL 帖子,这些解决方法都不起作用。 MSVCR90.DLL 现在位于 system32 中 - 出现“链接错误”错误。

提前致谢。

... 将要

------
W:\> ruby adapter.rb
>> Thin web server (v1.2.2 codename I Find Your Lack of Sauce Disturbing)
>> Maximum connections set to 1024
>> Listening on 127.0.0.1:3000, CTRL+C to stop
c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin_parser.so: 1114: A dynamic link library (DLL) initialization routine failed.  
    - c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin_parser.so (LoadError)
      from c:/bin/ruby/v1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/request.rb:1
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/connection.rb:35:in `post_init'
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/em/connection.rb:43:in `new'
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/em/connection.rb:36:in `instance_eval'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/em/connection.rb:36:in `new'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/eventmachine.rb:1490:in `event_callback'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/eventmachine.rb:242:in `run_machine'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/eventmachine.rb:242:in `run'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/backends/base.rb:57:in `start'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/server.rb:156:in `start!'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/server.rb:142:in `start'
    from adapter.rb:21

I was attempting to run the Ruby Thin demo application on Windows/XP when I got an error that Windows couldn't find "msvcr90.dll" for Ruby 1.8.7 -- I found a redistributable and put that in my path to be confronted with the information that:

"R6034 ... application has made an attempt to lead the C runtime incorrectly"

Earlier today I ran a few eventmachine demos oK, so I am thinking that the problem is with Thin.

The Ruby stack dump isn't that helpful ... (included below). Is there a cure?

I've looked over the other MSVCR90.DLL posts, none of those cures work. The MSVCR90.DLL is now in system32 -- With the "incorrectly linked" error.

Thanks in advance.

... Will

------
W:\> ruby adapter.rb
>> Thin web server (v1.2.2 codename I Find Your Lack of Sauce Disturbing)
>> Maximum connections set to 1024
>> Listening on 127.0.0.1:3000, CTRL+C to stop
c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin_parser.so: 1114: A dynamic link library (DLL) initialization routine failed.  
    - c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin_parser.so (LoadError)
      from c:/bin/ruby/v1.8/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/request.rb:1
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/connection.rb:35:in `post_init'
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/em/connection.rb:43:in `new'
      from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/em/connection.rb:36:in `instance_eval'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/em/connection.rb:36:in `new'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/eventmachine.rb:1490:in `event_callback'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/eventmachine.rb:242:in `run_machine'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/eventmachine-0.12.8-x86-mswin32-60/lib/eventmachine.rb:242:in `run'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/backends/base.rb:57:in `start'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/server.rb:156:in `start!'
    from c:/bin/ruby/v1.8/lib/ruby/gems/1.8/gems/thin-1.2.2/lib/thin/server.rb:142:in `start'
    from adapter.rb:21

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝礼 2024-08-03 04:47:31

似乎您需要排除 /MD 参数
并确保您的库调用的是 xfree,而不是 free :)

http: //groups.google.com/group/thin-ruby/browse_thread/thread/c15b2472eb97c2ba/ea7c5127035d193b
-r

appears to be that you need to exclude the /MD parameter
and make sure your library calls xfree, not free :)

http://groups.google.com/group/thin-ruby/browse_thread/thread/c15b2472eb97c2ba/ea7c5127035d193b
-r

绿光 2024-08-03 04:47:31

对于 Ruby 1.9,这个问题似乎已通过(WindowsRubyInstaller DevKit,请注意,它仍在进行中。

回到最初的问题,构建将取决于您使用的 Ruby 是使用哪个编译器构建的,等等。即使使用当前的 DevKit 事情并不是 100% 的。 我有一些构建失败了。 所以对你的环境有一定的敏感性。

祝你好运。

For Ruby 1.9 this appears to be getting resolved with the (Windows) RubyInstaller DevKit, caveat it is still a work in progress.

Harking back to the original issue, the build will depend on which compiler the Ruby you are using was built with, etc. Even with the current DevKit things aren't 100%. I had a few builds fail. So there's definite sensitivity to your environment.

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文