Rails and Rack

Quoting the Rack documentation:[44]

Rack provides a minimal, modular, and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.

Rails applications need a web server in order to interact through the HTTP protocol. And since the early days, the Rails community has seen a huge range of web servers available to deploy applications.

Early on, Rails was responsible for providing an adapter to each web server it supported: one for Mongrel, another for WEBrick, another for Thin, and so on. Similarly, other frameworks ...

Get Crafting Rails 4 Applications, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.