32 Rack Resources to Get You Started
What the heck is Rack and why is it getting so much press lately? Well, from it’s tag-line: “Rack provides an minimal interface between webservers supporting Ruby and Ruby frameworks.”
But what does that mean? Prior to Rack if you wanted to interface with Mongrel or Thin you had to write your own custom wrapper for talking to that web server. Rack standardized the interface for doing that and even added some icing on the cake.
- Rack Homepage – This is the official Rack home page. There’s a mirror on GitHub as well.
- Rack on GitHub – This is the official Rack source repository.
- Rack-Contrib – This is the repository for rack middleware and different rack utilities. It’s a great starting point for examples.
- Rack-development – The official Rack Google Group. It’s a great place to ask questions or get help with Rack related troubles.
- Rack::Test and its RDoc. Much like Rack is a standard interface for talking to web servers, Rack::Test is a standard interface for testing Rack apps.
Tutorials and Links
- Introducing Rack by Christian Neukirchen. Christian is the author rack and this is the introductory blog post about it.
- Introduction to Rack Middleware – This tutorial goes through what Rack middleware is and gives an example of writing an ascii shrimp middleware in your application.
- Adding cache headers by Vidar Hokstad is another example of creating a middleware for a specific purpose.
- Rack middleware asciicast the same version of the RailsCast below but in text form.
- Flash uploaders, Rails, cookie based sessions and CSRF: Rack Middleware to the rescue! – This is one of the better tutorials out there because it starts with a real world problem and demonstrates how to solve it.
- Itâ€™s Only Rack on Rails But I Like It – Noel Rappin goes through and gives a brief introduction to Rack, why it’s good for Rails, and how to use it from a Rails app.
- How to setup and use Rack::Cache with Rails 2.3 – The title is pretty self explanatory.
- Rails Metal introduction is an awesome introduction to Rails Metal by Jesse Newland.
- Plugging Rack into Rails – Another rack/rails tutorial.
Screencasts, Videos, and Presentations
- Rack presentations on the Rack GitHub wiki.
- Rack middleware RailsCast – Ryan Bates usual high quality screencasts on how to create a Rack Middleware
- Rails Metal RailsCast – An introduction to creating Rails Metal apps by Ryan Bates
- Rack basics – Remi goes in to the very basics of Rack.
- Rack part 2 – Going over rackup files, creating an executable rack application, using middleware, reloading
- Rack Middleware – What it is, how to write your own, using it in Sinatra and Rails
- Another Rack middleware screencast
- List of Rack Middleware on the Rack wiki.
- Rack-Cache – HTTP reverse proxy cache (Google Group). If you want to explore using HTTP caching to its fullest check out this link. It has a few links that explain HTTP caching as well.
- CSS Variables and a tutorial for using it.
- Hancock-client is a sinatra app and rack middleware piece for the hancock SSO server.