# \[ANN\] Mongrel 0.3.9 -- GemPlugin Based

**URL:** <https://www.ruby-forum.com/t/ann-mongrel-0-3-9-gemplugin-based/77187>\
**Category:** Rails\
**Created:** [March 6, 2006, 7:38am UTC](https://www.ruby-forum.com/t/ann-mongrel-0-3-9-gemplugin-based/77187 "2006-03-06T07:38:44Z")\
**Posts on this page:** 4\
**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:** [March 6, 2006, 7:38am UTC](https://www.ruby-forum.com/t/ann-mongrel-0-3-9-gemplugin-based/77187/1 "2006-03-06T07:38:44Z")

</div>

Hello everyone,

Mongrel now has plugins that are based entirely on RubyGems. This  
feature  
was so slick that I decided to bust it out into a separate project  
called  
GemPlugin (more on that later). What the new plugin system does is  
makes it  
so that people can distribute Mongrel plugins as just plain gems, and  
mongrel will load them on the fly if people install them. There’s no  
configuration necessary to get this working, and you can already write  
your  
own mongrel\_rails commands.

== What’s 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.

== Win32 Warning

I’m holding back win32 people for a day while I test this stuff out more  
completely. It has some slightly specific things that I still need to  
tweak  
on win32 to get everything working quite right. Super cool people with  
build tools can give this a shot and let me know how it goes. Everyone  
else  
needs to wait, sorry.

== Plugins In Action

The plugin system is actually pretty easy for people to use. Let’s say  
you  
do your update:

$ gem update

Which should update mongrel to 0.3.9 and also install a gem\_plugin 0.1.  
People who haven’t used Mongrel before should do this:

$ gem install mongrel

Which will again install gem\_plugin as a dependency.

To see how the demo works, just run mongrel\_rails and see what commands  
are  
available.

Now for the cool part. Find a Rails application and run it in daemon  
mode:

$ cd myapp  
$ mongrel\_rails start -d

Ok, now lets install the new mongrel\_status plugin and use it to get the  
PID:

$ sudo gem install mongrel\_status  
$ mongrel\_rails status

If everything worked it should spit out the PID of whatever is running.  
If  
you now do mongrel\_rails you’ll see that there’s this new “status”  
command.  
Feel free to do this too:

$ mongrel\_rails status -h

Big deal right? Ok, remove it and watch the status command go away:

$ sudo gem uninstall mongrel\_status  
$ mongrel\_rails

See, no more status command.

== How It Works

I’m still wrestling with the explanation of how GemPlugin works, but go  
ahead and read:

[http://mongrel.rubyforge.org/gem\_plugin\_rdoc/](http://mongrel.rubyforge.org/gem_plugin_rdoc/)

To get an idea. It’s weird but works fantastic.

== Next Steps

In the push to 0.4 I’ll be implementing handlers and filters as plugins  
and  
setting up the “grand config system” so that you can attach them to  
URIs.  
This should be point at which people can literally write their own  
plugins  
and extensions to Mongrel without much extra effort.

Enjoy! And please post the bugs.

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:** [March 6, 2006, 7:59am UTC](https://www.ruby-forum.com/t/ann-mongrel-0-3-9-gemplugin-based/77187/2 "2006-03-06T07:59:52Z")

</div>

On Mar 5, 2006, at 10:36 PM, Zed S. wrote:

> > $ gem update
> 
> ~: sudo gem update mongrel  
> Password:  
> Upgrading installed gems…  
> Updating Gem source index for: [http://gems.rubyforge.org](http://gems.rubyforge.org)  
> Attempting remote upgrade of mongrel  
> Attempting remote installation of ‘mongrel’  
> Select which gem to install for your platform (powerpc-darwin8.3.0)
> 
> 1. mongrel 0.3.9 (ruby)

snip…

> 1. Cancel installation
> 
> > 1  
> > Install required dependency gem\_plugin? [Yn] Y  
> > ERROR: While executing gem … (OpenURI::HTTPError)  
> > 404 Not Found

–  
– Tom M.

---

<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:** [March 6, 2006, 4:59pm UTC](https://www.ruby-forum.com/t/ann-mongrel-0-3-9-gemplugin-based/77187/3 "2006-03-06T16:59:31Z")

</div>

Minor nitpick, but I would love it if someone could figure out why the  
win32  
version of mongrel won’t respond to ctrl-C.  
Thanks,  
Carl

---

<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:** [March 6, 2006, 7:56pm UTC](https://www.ruby-forum.com/t/ann-mongrel-0-3-9-gemplugin-based/77187/4 "2006-03-06T19:56:14Z")

</div>

On Mon, Mar 06, 2006 at 07:58:34AM -0800, Carl Y. wrote:

> Minor nitpick, but I would love it if someone could figure out why the win32  
> version of mongrel won’t respond to ctrl-C.  
> Thanks,  
> Carl

Use CTRL-Pause Break instead. CTRL-C doesn’t quite work because of the  
way threading is going. I’ll look at printing out a little message for  
win32 folks when they start mongrel\_rails up.

Zed A. Shaw

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