# Mongrel 0.3.4 -- Win32 Gems/Better CGIWrapper

**URL:** <https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100>\
**Category:** Ruby\
**Created:** [February 16, 2006, 8:40am UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100 "2006-02-16T08:40:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 16, 2006, 8:40am UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/1 "2006-02-16T08:40:02Z")

</div>

Hello Everyone,

Today’s Mongrel is the first release to sport spiffy pre-built win32  
gems.  
This comes thanks to Wilson B. donating some Rakefile magic that  
does  
the stuff for me. Everyone who uses win32 should send Wilson a  
thank-you  
since without him you’d be a victim of my laziness for at least a few  
more  
weeks.

People who are testing and trying Mongrel out should grab this release,  
but  
please expect it to have bugs as there’s pretty fresh code in it. It’s  
been  
tested but there’s still a few situations to figure out (like redirects  
from  
behind a proxy).

== What Is Mongrel

Mongrel is a fast HTTP library and server for Ruby that is intended for  
hosting Ruby web applications of any kind using plain HTTP rather than  
FastCGI or SCGI. It is framework agnostic and already supports Ruby On  
Rails, Og+Nitro, and Camping frameworks. (Is anyone else getting tired  
of  
this?)

You can get information on Mongrel and look at people’s dogs at:

- [http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)

== Getting Mongrel

You can go to the project page to get the source or gem downloads  
manually,  
or you can just do:

$ gem install mongrel (people who have it already can do gem update)

== Changes

This release is mostly about getting a win32 gem out for people to try.  
Hopefully it all works right, but let me know.

There is also a much improved and refined CGIWrapper for getting Rails  
to  
work right, and this has been tested with eXPlainPMT as well as Typo.  
Redirects work, forms, etc. What doesn’t work right yet is redirecting  
when  
you’re behind a proxy, and probably anything related to file uploads.  
That’ll come next release.

There’s also a few little bug fixes.

== Next Release

The 0.4 goal is to get Rails support rock solid. To get there I’ve  
started  
installing various Rails applications and will use Watir to run  
automated  
tests. Anyone who has some Watir tests floating around that they’d like  
to  
donate will be my friend.

I’ve also got a plan for the mysterious caching thing I’ve mentioned in  
the  
past. I’ll be writing a little document and asking for feedback as it’s  
quite weird.

Otherwise, please test this 0.3.4 release and let me know what you hit.

Zed A. Shaw

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

---

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 16, 2006, 9:46am UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/2 "2006-02-16T09:46:17Z")

</div>

Hi

Great work!  
Just one question: is there a specific reason why the gem for 0.3.4  
requires ruby 1.8.4?

---

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 16, 2006, 11:20am UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/3 "2006-02-16T11:20:09Z")

</div>

hi Zed

thanks for the new version!

i’m using rails webservices from within a controller, specifically I’m  
doing this to get a remote object

def remote(user)  
account\_server =  
“[http://localhost](http://localhost):#{$site\_spec[“account\_server”]}/user/api/RPC”  
ActionWebService::Client::XmlRpc.new(UserApi, account\_server)  
end

where the “account\_server” port is actually an ssh tunnel so it is  
remote.

anyway works when account\_server URL is a webrick hosted server. With  
mongrel I get the correct request/response in terms of the xmlrpc  
payload, but I get the following error displayed on the client (i.e. in  
this case the rails controller)

Wrong content-type:

now, this is with 0.34 and it does not use the proxy as in my last  
post.  
i think this error is an improvement over 0.33 too, because in that  
case I was getting “wrong size” errors or something like that, with a  
print out of the given and expected bytes.

thanks for any help

BD

---

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 16, 2006, 1:08pm UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/4 "2006-02-16T13:08:42Z")

</div>

Version 1.8.4 of Ruby has the readpartial function for Socket (and other  
IO). Without this Mongrel don’t work so well.

Zed

---

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 18, 2006, 2:14am UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/5 "2006-02-18T02:14:28Z")

</div>

Comments below…

On 2/16/06 5:18 AM, “\_blackdog” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> ActionWebService::Client::XmlRpc.new(UserApi, account_server)
> 
> ```
> 
> end
> 
> where the “account\_server” port is actually an ssh tunnel so it is  
> remote.

I think I’ve got this solved and should have it out in the next release.  
I’m thinking maybe Sunday for it. Stay tuned and thanks for the  
testing.

Zed A. Shaw

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

---

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 18, 2006, 6:16am UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/6 "2006-02-18T06:16:15Z")

</div>

Zed S. wrote:

> Version 1.8.4 of Ruby has the readpartial function for Socket (and other  
> IO). Without this Mongrel don’t work so well.

I just tried the Win32 gem, but it complains that I do not have  
msvcr70.dll. I do, however, have msvcr71.dll (in n ruby\bin dir), which  
I believe is what comes as part of the recent Ruby 1.8.4 Windows 1-click  
package. (I also have msvcr71.dll as part of 1-click installation on  
an other box with Ruby 1.8.2.)

But Mongrel seems to insist on a particular version (perhaps hardcoded  
in http11.so), so it won’t run (unless , I imagine, I go dig up that  
specific DLL someplace).

Thanks,

–  
James B.

“Programs must be written for people to read, and only incidentally  
for machines to execute.”

- H. Abelson and G. Sussman  
(in "The Structure and Interpretation of Computer Programs)

---

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 16, 2006, 2:15pm UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/7 "2006-02-16T14:15:14Z")

</div>

Let me try with an AWS setup. It might be that the way CGI tries to set  
the  
content-type is conflicting with how I’ve interpreted it. And that’s an  
empty content type right?

Zed A. Shaw

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

---

<div class="post-metadata">

**Author:** ![Zed\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/da6949/32.png) [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Post date:** [February 18, 2006, 4:13pm UTC](https://www.ruby-forum.com/t/mongrel-0-3-4-win32-gems-better-cgiwrapper/69100/8 "2006-02-18T16:13:07Z")

</div>

DÅ?a Sobota 18 FebruÃ¡r 2006 06:13 James B. napÃ­sal:

> But Mongrel seems to insist on a particular version (perhaps hardcoded  
> in http11.so), so it won’t run (unless , I imagine, I go dig up that  
> specific DLL someplace).

Yay for msvcrt version lossage _mutter_. My favourite was .NET 2.0 cl  
linking  
against v8.0 which was provided with the SDK for everything -except- x86  
architectures, and not available otherwise at the time.

I believe it’s the fault of Zed S.'s (or whoever builds the win32 gem)  
version of Visual Studio linking stuff against it - yes, it is probably  
hardcoded in the so. I believe the easiest thing will be getting the 7.0  
version and dropping it on the PATH until someone forces the VS to link  
against v7.1.

David V.
