Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A ruby web server built for concurrency
Tree: 3f529f0731

Add ability to wakeup and cancel persistent connections

Without this, the graceful stop code has to wait for the persistent
timeout to expire even though there is actually no work going on.
latest commit 3f529f0731
@evanphx evanphx authored
Failed to load latest commit information.
bin Add ability to wakeup and cancel persistent connections
examples Add ability to use a config file (-C, --config)
ext/puma_http11 Fix use of "unsafeBytes" leading to offset errors and regen parser.
lib Add ability to wakeup and cancel persistent connections
test Disable test on JRuby
tools minor test cleanups
.gitignore Ignore rubinius compiled files.
.travis.yml Fix race conditions in tests, change travis rbx name
COPYING Ruby license applied to all files
Gemfile Add rdoc and rake-compiler as gems
History.txt That was too early, revert to 1.2.0.beta.1 instead.
LICENSE Update license
Manifest.txt Bump to 0.9.1
README.md Add documentation for Rails/Sinatra/Rack usage
Rakefile
TODO oops... gems is quite necessary
puma.gemspec Bump to 0.9.1

README.md

Puma: A Ruby Web Server Built For Concurrency

Description

Puma is a small library that provides a very fast and concurrent HTTP 1.1 server for Ruby web applications. It is designed for running rack apps only.

What makes Puma so fast is the careful use of an Ragel extension to provide fast, accurate HTTP 1.1 protocol parsing. This makes the server scream without too many portability issues.

License

Puma is copyright 2011 Evan Phoenix and contributors. It is licensed under the BSD license. See the include LICENSE file for details.

Quick Start

The easiest way to get started with Puma is to install it via RubyGems and then run a Ruby on Rails application. You can do this easily:

$ gem install puma

Now you should have the puma command available in your PATH, so just do the following:

$ puma app.ru

Install

$ gem install puma

Advanced Setup

Sinatra

You can run your Sinatra application with Puma from the command line like this:

$ ruby app.rb -s Puma

Or you can configure your application to always use Puma:

require 'sinatra'
configure { set :server, :puma }

If you use Bundler, make sure you add Puma to your Gemfile (see below).

Rails

First, make sure Puma is in your Gemfile:

gem 'puma'

Then start your server with the rails command:

$ rails s puma

Rackup

You can pass it as an option to rackup:

$ rackup -s puma

Alternatively, you can modify your config.ru to choose Puma by default, by adding the following as the first line:

#\ -s puma
Something went wrong with that request. Please try again.