views:

376

answers:

4

When I try to run even simple rails commands such as:

rails -h

I get a popup error after a few seconds that says:

ruby.exe - Unable To Locate Component

This application has failed to start because msvcrt-ruby18.dll was not found. Re-installing the application may fix the problem.

I am running:

  • Windows XP (yes I know I should attempt ruby on a Windows machine).
  • Ruby 1.9.1p378 [i386-mingw32].
  • Have updated all my gems to latest versions (as of 14-July-2010).

Is there a way I can test what is making this error? Does anyone know what it could mean?

I have found that in my ruby19/bin folder there is msvcrt-ruby191.dll but there is no msvcrt-ruby18.dll anywhere. Why would it be looking for this anyway if I'm using ruby 1.9?

A: 

Ruby 1.9.1 was running well on my Windows XP PC, but I've got this error message after installing mongrel. Unfortunately, mongrel has no update for Ruby 1.9.1 yet. Perhaps, for this reason, it generates this error on my PC.

Wasim
A: 

JRuby might work better for you. Either way, trying to use Ruby on Windows will leave a bad taste in your mouth. Either get a VM with Linux to work with it, or pay $10/mo for a VPS where you can play.

Preston Marshall
I use Ruby on Windows all of the time with no big complaints. Telling someone to move to a different OS to solve this problem is ridiculous.
Ed Swangren
Good for you. I'm not saying its impossible, but in my personal experience it's a pain. I wasn't telling him to do anything, I was simply recommending an alternative. BTW I didn't see an answer from you here.
Preston Marshall
+2  A: 

The current release version 1.1.5 of Mongrel is incompatible with Ruby 1.9 and throws this error when it is run. It's easy to solve - just make sure Rubygems is up-to-date:

gem update --system

Then install the new pre-release version of Mongrel:

gem install mongrel --pre

Alternatively, if this isn't caused by Mongrel, you can try installing the DevKit, then try this:

gem install *gemname* --platform=ruby

This forces compilation of the extension from source using DevKit and works with most of the major gems I've tried.

Charles Roper
I don't actually have the Mongrel gem installed, but it could possibly be another gem. I will try!
TandemAdam
The error you're seeing happens when you try to use a binary gem under 1.9 that has only been compiled for 1.8. Try contacting the gem author and point them in the direction of Rake Compiler: http://github.com/luislavena/rake-compiler
Charles Roper
Must have been an incompatibility somewhere, because I just upgrading everything and things are now working fine. Thanks.
TandemAdam
A: 

you got the binary version of the gem, which only includes binaries for 1.8 try gem install mongrel --platform=ruby --pre

rogerdpack