Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongrel vs. WEBrick

What is the difference between Mongrel and WEBrick?

Which one should I use?

Why does Rails ship with both?

like image 553
Landon Kuhn Avatar asked Feb 27 '09 22:02

Landon Kuhn


2 Answers

For your local development, they'll both work. Mongrel is faster, more efficient, and stable. Some people (myself included) use it to host their production sites, even. Certainly okay for local development.

If you're on non-Windows, I'd suggest looking at Phusion Passenger. You can support multiple apps on your localhost without having to do a 'ruby script/server' every time you want to run something.

When running Phusion Passenger, you'll have to tail the log file yourself. mongrel will display the log in the console window, so to get that functionality you'll have to tail -f log/development.log with Passenger.

Why does Rails ship with both? History. Webrick is written in ruby, so it was the early favorite. Mongrel came along and was better, but webrick support wasn't dropped.

If you don't want to install Phusion Passenger, use mongrel. It's the default and it works.

EDIT 2009-08: I've also had good luck with thin, a drop-in replacement for mongrel. For development, it's not that big of a deal, but it'd be something to check out for production.

like image 124
wesgarrison Avatar answered Sep 23 '22 10:09

wesgarrison


Mongrel is considerably more efficient and stable.

like image 42
Eli Avatar answered Sep 25 '22 10:09

Eli