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.
You need Ruby 1.8.4 just like the gem says you do.
Getting Started
The easiest way to get started with Mongrel is to install it via RubyGems and then run a Ruby on Rails application. You can do this easily:
$ sudo gem install mongrel
$ cd myrailsapp
$ mongrel_rails start -d
Which runs Mongrel in the background. You can stop it with:
$ mongrel_rails stop
And you’re all set. There’s quite a few options you can set for the start command. Use the mongrel_rails start -h to see them all.
Win32 Support
Win32 is fully supported by Mongrel with services and CPU affinity support. You should read the Win32 HOWTO for information on getting started.
The main thing with Win32 support is that there is no fork API for Ruby, so you have to use the services features to get persistent servers running. You can get this services support by doing:
gem install mongrel_service
And then just run mongrel_rails
to see what services::
commands
are available.
Next Steps
Now that you’re a Mongrel user, there’s some thing you should do to educate yourself:
- Join the mailing list
- Read the documentation
- Learn to use—help when you want to know what Mongrel commands can do.
The last one is important. A lot of effort went into making Mongrel as self-documenting as possible. Before you hit the mailing list asking how to do something, try passing that command—help and see if it tells you. If it’s still not clear then ask away.