Mongrel 0.3 -- Runs Ruby On Rails


#1

Hello Folks,

This is the long awaited release of the Mongrel HTTP library that
supports Ruby On Rails. I know tons of people have been waiting
for it, so I’ve got a few things to lay down first before you get all
excited:

  1. It’s very very ALPHA support for Rails. It will run a Rails app,
    and runs my simple apps, but it’s not fast or correct as it needs to be.
  2. It should work for win32 people who can build it, but it won’t
    become a service. Run it in a cmd window.
  3. I did this release late at night so we know how well those hold
    up. :slight_smile:

Otherwise, please punish it like crazy for me.

== Getting The Goods

You can grab Mongrel via:

You can also install using RubyGems with:

sudo gem install mongrel

And of course you need to have a compiler installed for it to build
just like before. No new C code has been included so if you built it
before then you can build it now. If you can’t build it then let me
know and I’ll help you out.

You can also go to the project page’s Files section to grab
source .tgz files if you like to install with setup.rb and source.

== Running Ruby On Rails

The Rails support is done through a small script called
mongrel_rails. This script kicks up all the gear needed for your
application, hooks it into Mongrel, and then goes into daemon mode
(if you install the daemons gem). If you install with RubyGems then
you should get the mongrel_rails command as well. You can then run
it with:

cd myapp
mongrel_rails 0.0.0.0 3000

It will write any errors to log/mongrel.log and put it’s PID into log/
mongrel-3000.pid. You can kill it with:

kill -TERM cat log/mongrel-3000.pid

You should then be able to hit your local web server and see your
Rails application run. If it don’t then send me your mongrel.log.
Another thing to do is if you get a URL giving you the wrong mime
type then let me know. If you get a malformed response then send me
the result of doing:

curl -i http://localhost:3000/the/bad/uri

== Big Changes

  • URIClassifier had an error in the prefix based search such that “/”
    wasn’t getting resolved. Fixed this up and cleaned it.
  • DirHandler now supports many more needed features such as mime type
    mapping, serving index.html if present, getting the paths right on
    “/” mounted directories, and allowing others to ask if a DirHandler
    can serve a file. All of this was so that Mongrel can run a Rails
    app with no external support.
  • Fixed a problem with Error404Handler which caused an explosion.
  • Implemented the mongrel_rails server so people can start working
    with Rails and Mongrel.

== Next Release

I’ll be focusing on making the Rails support tight as hell and
squeezing out every ounce of performance possible. This will include
making my dream caching mechanism.

I’ll also look at the next nail in the CGI library’s coffin: multi-
part mime decoding and handling uploaded files. I’m setting my
sights next on CGI as the library to take down. Anyone interested in
helping on this should contact me.

Enjoy the release and send me your bug reports.

Zed A. Shaw