Mongrel 0.3.4 -- Win32 Gems/Better CGIWrapper

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:

== 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

Hi

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

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:#{$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

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

Zed

Comments below…

On 2/16/06 5:18 AM, “_blackdog” [email protected] 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 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)

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

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.