Trying to compile Mongrel with nmake

Hi group,

My name is Olle, and I’m on Windows at the moment, and I procrastinate
from work by trying to get nmake to compile the Mongrel gem. (I’m a
beginner at compiling.)

I got the nmake1.5 from Microsoft’s website, after following the advice
of a blog post on a Perl website.
Make for Microsoft Windows: NMake. I stuck the nmake.exe
and nmake.err in the ruby/bin folder. From there, I could run it.

  1. Is nmake 1.50 good enough to compile Mongrel?

  2. First I got two error messages from nmake, is this normal behaviour
    when compiling gems on Windows? Text-chunk #1 shows these messages.

  3. After this, the ouput was as Text-chunk #2 indicates, a Ruby check
    for the main() function in the c.lib from Mongrel. With the answer
    “no”. I take it that this indicates a failure.

  4. After the nmake lines I have the happy messages:

Successfully installed mongrel, version 0.1.0
Installing RDoc documentation for mongrel-0.1.0…

(I take it these messages are false alarms.)

When I try and run the included script at http://mongrel.rubyforge.org/
under the heading “Usage”, I get an error:

(No such file to load – mongrel (LoadError)).

Changing the require to require_gem gave antoher error on the first
line where Mongrel is mentioned:

uninitialized constant Mongrel (NameError)

What would you do in this case? Where can I find out more on nmake and
gems? Thanks in advance,

Olle Jonsson

===Text-chunk #1:===

C:\Documents and Settings\olle>gem install mongrel
Attempting local installation of ‘mongrel’
Building native extensions. This could take a while…

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

‘cl’ is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: ‘C:\WINDOWS\system32\cmd.exe’ : return code
‘0x1’
Stop.

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

‘cl’ is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: ‘C:\WINDOWS\system32\cmd.exe’ : return code
‘0x1’
Stop.

===Text-chunk #2:===

ruby extconf.rb install mongrel
checking for main() in c.lib… no
creating Makefile

On 01/02/06, olleolleolle [email protected] wrote:

Hi group,

My name is Olle, and I’m on Windows at the moment, and I procrastinate
from work by trying to get nmake to compile the Mongrel gem. (I’m a
beginner at compiling.)

You need a C++ compiler.

-austin

On Feb 1, 2006, at 4:47 PM, olleolleolle wrote:

and nmake.err in the ruby/bin folder. From there, I could run it.

As Austin mentioned before I think you need the entire Microsoft VC++
set of tools. I believe you can get these for free now, but I’m not
quite sure if those will build modules for Ruby. I’m actually
looking to build a pre-compiled gem for win32 and osx in the near
future.

  1. Is nmake 1.50 good enough to compile Mongrel?

Sorry, no idea really. I don’t do as many win32 builds as I should.

> 4. After the nmake lines I have the happy messages: > > Successfully installed mongrel, version 0.1.0 > Installing RDoc documentation for mongrel-0.1.0... > Darn, looks like it still says 0.1.0 for the version. I'll have to update as it *should* be 0.2.0.

When I try and run the included script at http://
mongrel.rubyforge.org/
under the heading “Usage”, I get an error:

Yeah, something is up. I’d say keep tinkering if you want, but
mostly you’re probably better off waiting for the next release and
using the pre-built gems I want to do.

Zed A. Shaw