# Trying to compile Mongrel with nmake

**URL:** <https://www.ruby-forum.com/t/trying-to-compile-mongrel-with-nmake/100028>\
**Category:** Ruby\
**Created:** [February 1, 2006, 11:46pm UTC](https://www.ruby-forum.com/t/trying-to-compile-mongrel-with-nmake/100028 "2006-02-01T23:46:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![olleolleolle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/90ced4/32.png) [@olleolleolle](https://www.ruby-forum.com/u/olleolleolle)\
**Post date:** [February 1, 2006, 11:46pm UTC](https://www.ruby-forum.com/t/trying-to-compile-mongrel-with-nmake/100028/1 "2006-02-01T23:46:33Z")

</div>

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](http://johnbokma.com/perl/make-for-windows.html). 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/](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

---

<div class="post-metadata">

**Author:** ![olleolleolle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/90ced4/32.png) [@olleolleolle](https://www.ruby-forum.com/u/olleolleolle)\
**Post date:** [February 2, 2006, 1:30am UTC](https://www.ruby-forum.com/t/trying-to-compile-mongrel-with-nmake/100028/2 "2006-02-02T01:30:34Z")

</div>

On 01/02/06, olleolleolle [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![olleolleolle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/90ced4/32.png) [@olleolleolle](https://www.ruby-forum.com/u/olleolleolle)\
**Post date:** [February 2, 2006, 1:48am UTC](https://www.ruby-forum.com/t/trying-to-compile-mongrel-with-nmake/100028/3 "2006-02-02T01:48:52Z")

</div>

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/](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

> **[Zed A. shaw](https://zedshaw.com/)**
>
> Personal essays and writings by Zed A. Shaw.
