# Re: Mongrel HTTP Library 0.2.0 (Fast And RubyForgified)

**URL:** <https://www.ruby-forum.com/t/re-mongrel-http-library-0-2-0-fast-and-rubyforgified/100195>\
**Category:** Ruby\
**Created:** [February 2, 2006, 4:04am UTC](https://www.ruby-forum.com/t/re-mongrel-http-library-0-2-0-fast-and-rubyforgified/100195 "2006-02-02T04:04:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 2, 2006, 4:04am UTC](https://www.ruby-forum.com/t/re-mongrel-http-library-0-2-0-fast-and-rubyforgified/100195/1 "2006-02-02T04:04:42Z")

</div>

Seem to have a slight problem with the mongrel gem, unless I’m using the  
custom require supplied by rubygems, I can’t get the gem to work.

The following:

p require ‘rubygems’  
p require\_gem ‘mongrel’  
p Mongrel

gives me:

true  
true  
-:3: uninitialized constant Mongrel (NameError)

The following, however, works:

p require ‘ubygems’  
p require ‘mongrel’  
p Mongrel

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 2, 2006, 8:06am UTC](https://www.ruby-forum.com/t/re-mongrel-http-library-0-2-0-fast-and-rubyforgified/100195/2 "2006-02-02T08:06:35Z")

</div>

Odd, not quite sure what would cause that. Can you try the soon to  
be announce 0.2.1 release and let me know if you get the same problems?

Zed A. Shaw

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

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 2, 2006, 9:45pm UTC](https://www.ruby-forum.com/t/re-mongrel-http-library-0-2-0-fast-and-rubyforgified/100195/3 "2006-02-02T21:45:20Z")

</div>

You’re missing the fix posted just today. I’ll have a 0.2.2 out that  
should fix this later tonight. Basically, try adding:

#if defined(\_WIN32)  
#include \<stddef.h\>  
#endif

To the top of http\_parser.h just after the sys/types.h include.

Let me know if that works.

Zed A. Shaw

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

> I know Windows is evil, but I thought I’d paste in my log again, just  
> in case it becomes handy.
> 
> Ruby O.Click 1.8.2-15 install, Visual Studio 2K3  
>   
> -I./…/missing -c -Tchttp11\_parser.c  
> http11\_parser.c  
> e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2146: syntax  
> error  
> : missing ‘)’ before identifier ‘length’

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 2, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/re-mongrel-http-library-0-2-0-fast-and-rubyforgified/100195/4 "2006-02-02T21:15:05Z")

</div>

I know Windows is evil, but I thought I’d paste in my log again, just  
in case it becomes handy.

Ruby O.Click 1.8.2-15 install, Visual Studio 2K3  
Unpack tar.gz, run ‘vsvars32’ to set up the Visual C++ environment.  
I then modified the extconf.rb file to look for “libc.lib”, instead of  
“c.lib”, since this looked like the Visual Studio equivalent, and  
added a dir\_config to let it find ruby.h and whatnot.  
Without that it doesn’t link the library in during the mkmf step, or  
find the headers during compilation.  
(Just in case it sounds like I’m decent at compiling C extensions,  
don’t be deceived. I actually suck at it.)  
E:\Temp\mongrel-0.2.1\>rake compile  
(in E:/Temp/mongrel-0.2.1)  
c:/ruby/bin/ruby extconf.rb  
–with-ruby-include=e:/projects/ruby\_src/ruby  
–with-ruby-lib=e:/projects/ruby\_src/ruby/lib  
checking for main() in libc.lib… yes  
creating Makefile  
make

Microsoft ® Program Maintenance Utility Version 7.10.3077  
Copyright © Microsoft Corporation. All rights reserved.

```
    cl -nologo -MD -Zi -O2b2xg- -G6 -I. 

```

-Ic:/ruby/lib/ruby/1.8/i386-mswin32  
-Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I. -Ie:/projects/ruby\_src/ruby -I.  
-I./…  
-I./…/missing -c -Tchttp11\_parser.c  
http11\_parser.c  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2146:  
syntax error  
: missing ‘)’ before identifier ‘length’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2144:  
syntax error  
: ‘’ should be preceded by ‘’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2144:  
syntax error  
: ‘’ should be preceded by ‘’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2143:  
syntax error  
: missing ‘)’ before ‘identifier’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2081:  
‘size\_t’ : na  
me in formal parameter list illegal  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2061:  
syntax error  
: identifier ‘length’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(6) : error C2059:  
syntax error  
: ‘)’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2146:  
syntax error  
: missing ‘)’ before identifier ‘flen’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2144:  
syntax error  
: ‘’ should be preceded by ‘’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2144:  
syntax error  
: ‘’ should be preceded by ‘’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2143:  
syntax error  
: missing ‘)’ before ‘identifier’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2081:  
‘size\_t’ : na  
me in formal parameter list illegal  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2061:  
syntax error  
: identifier ‘flen’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2059:  
syntax error  
: ‘,’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(7) : error C2059:  
syntax error  
: ‘)’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(13) : error C2061:  
syntax error  
: identifier ‘size\_t’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(16) : error C2061:  
syntax error  
: identifier ‘field\_len’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(16) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(20) : error C2061:  
syntax error  
: identifier ‘http\_field’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(20) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(21) : error C2061:  
syntax error  
: identifier ‘request\_method’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(21) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(22) : error C2061:  
syntax error  
: identifier ‘path\_info’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(22) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(23) : error C2061:  
syntax error  
: identifier ‘query\_string’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(23) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(24) : error C2061:  
syntax error  
: identifier ‘http\_version’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(24) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(26) : error C2059:  
syntax error  
: ‘}’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(28) : error C2143:  
syntax error  
: missing ‘)’ before ‘_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(28) : error C2143:  
syntax error  
: missing ‘{’ before '_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(28) : error C2059:  
syntax error  
: ‘)’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(29) : error C2143:  
syntax error  
: missing ‘)’ before ‘_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(29) : error C2143:  
syntax error  
: missing ‘{’ before '_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(29) : error C2059:  
syntax error  
: ‘)’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(30) : error C2061:  
syntax error  
: identifier ‘http\_parser\_execute’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(30) : error C2059:  
syntax error  
: ‘;’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(30) : error C2143:  
syntax error  
: missing ‘)’ before ‘_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(30) : error C2143:  
syntax error  
: missing ‘{’ before '_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(30) : error C2059:  
syntax error  
: ‘type’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(30) : error C2059:  
syntax error  
: ‘)’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(31) : error C2143:  
syntax error  
: missing ‘)’ before ‘_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(31) : error C2143:  
syntax error  
: missing ‘{’ before '_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(31) : error C2059:  
syntax error  
: ‘)’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(32) : error C2143:  
syntax error  
: missing ‘)’ before ‘_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(32) : error C2143:  
syntax error  
: missing ‘{’ before '_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(32) : error C2059:  
syntax error  
: ‘)’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(33) : error C2143:  
syntax error  
: missing ‘)’ before ‘_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(33) : error C2143:  
syntax error  
: missing ‘{’ before '_’  
e:\Temp\mongrel-0.2.1\ext\http11\http11\_parser.h(33) : error C2059:  
syntax error  
: ‘)’  
ext/http11/http11\_parser.rl(105) : error C2143: syntax error : missing  
‘)’ befor  
e ‘_’  
ext/http11/http11\_parser.rl(105) : error C2143: syntax error : missing  
‘{’ befor  
e '_’  
ext/http11/http11\_parser.rl(105) : error C2059: syntax error : ‘)’  
ext/http11/http11\_parser.rl(105) : error C2054: expected ‘(’ to follow  
‘parser’  
ext/http11/http11\_parser.rl(108) : error C2005: #line expected a line  
number, fo  
und ‘string’  
ext/http11/http11\_parser.rl(112) : error C2005: #line expected a line  
number, fo  
und ‘string’  
ext/http11/http11\_parser.rl(124) : error C2143: syntax error : missing  
‘)’ befor  
e ‘_’  
ext/http11/http11\_parser.rl(124) : error C2143: syntax error : missing  
‘{’ befor  
e '_’  
ext/http11/http11\_parser.rl(124) : error C2059: syntax error : ‘type’  
ext/http11/http11\_parser.rl(124) : error C2059: syntax error : ‘)’  
ext/http11/http11\_parser.rl(139) : error C2143: syntax error : missing  
‘)’ befor  
e ‘_’  
ext/http11/http11\_parser.rl(139) : error C2143: syntax error : missing  
‘{’ befor  
e '_’  
ext/http11/http11\_parser.rl(139) : error C2059: syntax error : ‘)’  
ext/http11/http11\_parser.rl(140) : error C2054: expected ‘(’ to follow  
‘parser’  
ext/http11/http11\_parser.rl(144) : error C2005: #line expected a line  
number, fo  
und ‘string’  
ext/http11/http11\_parser.rl(145) : error C2005: #line expected a line  
number, fo  
und ‘string’  
ext/http11/http11\_parser.rl(158) : error C2143: syntax error : missing  
‘)’ befor  
e ‘_’  
ext/http11/http11\_parser.rl(158) : error C2143: syntax error : missing  
‘{’ befor  
e '_’  
ext/http11/http11\_parser.rl(158) : error C2059: syntax error : ‘)’  
ext/http11/http11\_parser.rl(158) : error C2054: expected ‘(’ to follow  
‘parser’  
ext/http11/http11\_parser.rl(162) : error C2143: syntax error : missing  
‘)’ befor  
e ‘_’  
ext/http11/http11\_parser.rl(162) : error C2143: syntax error : missing  
‘{’ befor  
e '_’  
ext/http11/http11\_parser.rl(162) : error C2059: syntax error : ‘)’  
ext/http11/http11\_parser.rl(162) : error C2054: expected ‘(’ to follow  
‘parser’  
NMAKE : fatal error U1077: ‘cl’ : return code ‘0x2’  
Stop.  
rake aborted!  
Command failed with status (2): [make]

(See full trace by running task with --trace)

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 2, 2006, 11:09pm UTC](https://www.ruby-forum.com/t/re-mongrel-http-library-0-2-0-fast-and-rubyforgified/100195/5 "2006-02-02T23:09:49Z")

</div>

On 2/2/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

Awesome. Fixed. The changes I made to extconf.rb were unnecessary as  
well.

> rake test  
> Started  
> …  
> RESOLVE(8500): 0.062000 0.000000 0.062000 ( 0.062000)  
> REG\_UNREG(8500): 0.063000 0.000000 0.063000 ( 0.063000)  
> …  
> Finished in 1.172 seconds.

14 tests, 210 assertions, 0 failures, 0 errors
