Chapter 18. Rack-based applications

This chapter covers

  • Building a basic Rack application
  • Tying together Rack applications
  • Mounting a Rack app within a Rails app
  • Using Rack middleware to alter server response

So far, this book has primarily focused on how to work with pieces of the Rails framework, such as application and engines. In this chapter, we’ll look at how you can use Rack-based applications to respond more quickly than what you’d otherwise be capable of with your main application.

Rack is the underlying web server framework that powers the underlying request/response cycle found in Rails, but it isn’t a part of Rails itself. It’s completely separate, with Rails requiring the parts of Rack it needs. When your application is running, ...

Get Rails 3 in Action 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.