Written by Sean Behan on Sun Jun 17th 2012

What is Rack?

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.
- Rack API Docs
Create and name your file config.ru If rack isn't installed get it with this command
gem install rack
In your config.ru file
require 'rubygems'
require 'rack'

class HelloRack def call(env) [200, {"Content-Type" => "text/html"}, "Hello Rack!"] end end

Rack::Handler::Mongrel.run HelloRack.new, :Port => 8888

Check out http://m.onkey.org/2008/11/17/ruby-on-rack-1


Tagged with..
#getting started #rack #ruby #ruby

Just finishing up brewing up some fresh ground comments...