How do you run WEBrick under Rails 2.x?

It appears that Mongrel is now the default development server for Rails as of 2.x.

I'm assuming this because I'm unable to run Mongrel (for reasons I don't totally understand yet - I am running Windows and I keep getting asked for MSVCR80.dll which is a _64 bit_ dll on my Win XP machine) and if I issue ruby script/server, I see the same errors that I get when I try to start Mongrel.

Is Mongrel the new default for the Rails development server, and if so, how can I continue to run WEBrick under Rails 2.x?

Thanks, Wes

Download this file: http://www.dll-files.com/dllindex/dll-files.shtml?msvcr80 and put it in your system32 file. It’s a C Runtime Library file.

There may be others that you’re missing too.

Ummm… Wes, when you start ruby script/server it tells you how to start webrick.

=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)

More importantly, since you’re on Windows, you should know that the stack has been a bit unstable lately but all has been fixed as far as I know… do you have the LATEST rubygems?

gem update --system gem update mongrel

Brian Hogan wrote:

Ummm... Wes, when you start ruby script/server it tells you how to start webrick.

=> Booting Mongrel (use 'script/server webrick' to force WEBrick)

More importantly, since you're on Windows, you should know that the stack has been a bit unstable lately but all has been fixed as far as I know... do you have the LATEST rubygems?

gem update --system gem update mongrel

Brian,

I see the error about MSVCR80.DLL before I ever see a message about how to start WEBrick.

But when I do execute "ruby script/server webrick" also gives me the error so either the webrick flag isn't working or my problem is not Mongrel specific. Just for the record, I have a project on Rails 1.1.6 and can still start WEBrick on that with no problem. This only seems to happen on my 2.0.2 project.

I've been up to date with rubygems system for several days, the same for mongrel and the same for all of my other gems.

I'll give Ryan's suggestion and try and see what happens.

Wes

Ryan Bigg wrote:

Download this file: msvcr80.dll free download | DLL‑files.com and put it in your system32 file. It's a C Runtime Library file.

There may be others that you're missing too.

My attempt to put this file in my PATH just generates a runtime error which says that ruby.exe has made an attempt to load the C runtime library incorrectly. It shows an error code of "R6034".

I suspect that at some point, the Mongrel gem started getting compiled with a newer version of the MS C compiler than I have (I have the "free" Visual Studio 2003 components).

I will try either:

1) Moving back versions of Mongrel until it works 2) Updating my C runtime.

It would be interesting to find out if the Mongrel gem did "rev up" on the compiler version, though.

Wes

Current resolution:

Rolled back to Mongrel 1.1 and I can run it and WEBrick.

The original error (w/Mongrel 1.1.3) was a Windows dialog that displayed ""The application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem." When I would click on that dialog's OK button, it would pop up again and I would never be able to get past the error.

This behavior appears for Mongrel versions >= 1.1.1.

At 1.1, I get the error dialog once, click the OK button and the server (Mongrel or WEBrick) proceeds to start up.

Wes

I meant to put it in your C:\Windows\System 32 folder

Wes:

You might want to report that to mongrel’s rubyforge project page as a defect. I don’t have that problem here on my machines but that’s most likely because I have VS 2005 installed here. Sounds like they compiled it with that.

Ryan Bigg wrote:

I meant to put it in your C:\Windows\System 32 folder

I put the DLL in c:\windows\system32 and it didn't help.