0

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
will
  • 4,799
  • 8
  • 54
  • 90

2 Answers2

0

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

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
  • Hi there ... thaks I figured that about /MD before. Can you expand on what is xfree? The target here is Windows/XP, the only "xfree" I'm switched on to is the x-windows pac. Please see: THIN-RUBY thread http://groups.google.com/group/thin-ruby/browse_thread/thread/c15b2472eb97c2ba/b2497f846f1190a8?lnk=gst&q=link#b2497f846f1190a8 Where I lose traction, because the ultimate answer is mingw. Not to worry. There are some helpful comments. I found that the config.h and rbconfig.rb ar vital to resolving this. With today's builds. Get out there and make ruby compiler FREE!! \_w_/ – will Aug 06 '09 at 12:44
  • xfree is ruby's wrapper to the free method--calling it instead of free will make it possible to run your code "cross msvcrt.dll" [i.e. you link to one, run it in another], or so I'm told.http://programming-gone-awry.blogspot.com/2009/07/how-to-compile-using-visual-studio-for.html – rogerdpack Aug 11 '09 at 21:32
0

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.

will
  • 4,799
  • 8
  • 54
  • 90