rack

URL
http://rack.rubyforge.org
Author(s)
Christian Neukirchen
Summary
Rack provides 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

Add your comment ↓

Comments

rack (1.0.0) is Working
for Usman Ali (GNU/Linux, about 1 year ago)

it works for me :)

rack (1.0.0) is Working
for Andryusha (Mac OSX, over 2 years ago)

binghamtonts backbone

rack is Working
for Jake Douglas (Mac OSX, over 2 years ago)

rack (1.0.0) is Working
for Joshua Partogi (GNU/Linux, over 2 years ago)

Works well for me. I use it to run thin.

rack (1.0.0) is Failing
for haarts (Mac OSX, over 2 years ago)

Fails with multipart file uploads. Version on Github fixes the problem

rack (1.0.0) is Working
for Felipe Rodrigues (GNU/Linux, over 2 years ago)

Works pretty well

rack (1.0.0) is Working
for Evil Trout (Mac OSX, over 3 years ago)

rack (0.9.1) is Working
for Pistos (GNU/Linux, over 3 years ago)

Works for me for preliminary testing with Ramaze + Thin.

rack (0.9.1) is Working
for manveru (GNU/Linux, over 3 years ago)

Works just fine, but you'll have to:

class String
alias each each_line unless ''.repsond_to?(:each)
end

The spec of rack will change before 1.0 to fully support 1.9

rack (master) is Working
for Alex Sokoloff (Mac OSX, over 3 years ago)

New version from github works well

rack (0.9.1) is Working
for David Palm (Mac OSX, over 3 years ago)

No problems whatsoever encountered so far.

rack (master) is Working
for Ryan Tomayko (Mac OSX, over 3 years ago)

We just pushed a slew of 1.9.1 compatibility fixes to Rack's master:

http://github.com/rack/rack/commits/51f91a6

rack is Failing
for Nathan (Mac OSX, over 3 years ago)

I don't think each_line is a good idea for body, because it is useful to be able to feed Rack any object that has an each. Maybe Rack could continue to expect an enumerable and we should give it one? A simple method on String could fix this?

rack (0.9.1) is Failing
for Jonathan Broad (Mac OSX, over 3 years ago)

Found an effective workaround here: http://frozenplague.net/2009/01/ruby-191-rubygems-rails/

Replace:

vs.each { |v|
res[k] = v
}

With:

res[k] = vs

rack (0.9.1) is Failing
for Joon You (Mac OSX, over 3 years ago)

I was trying to see if I can Rack to work with 1.9.1. The only web server I can use is WEBrick since Mongrel as well as Thin does not work with 1.9.1. Rack installed without a hitch using ‘gem install rack’ command.

Using extremely simple code below, I wanted to see if I can hit my new super micro app.

super_micro_app = Proc.new { |env| [200, {'Content-Type' => 'text/plain'},'Please no more hello world crap'] }
require 'rack'
Rack::Handler::WEBrick.run(super_micro_app, :Port => 4000)

The problem is that this will barf because of the fact that String is no longer Enumerable. On line 47 of rack/handler/webrick.rb, you’ll see that each is called on ‘vs’ variable. Same thing happens on line 47 with ‘body’. The way I made this run is to change ‘vs.each’ to ‘vs.each_char’ on line 40 and ‘body.each’ to ‘body.each_line’ on line 47.

rack (0.9.1) is Failing
for Jai-Gouk Kim (GNU/Linux, over 3 years ago)

Ubuntu 8.1, x86.
Installs but has some Ruby 1.9 incompatible code.

rack (0.9.1) is Failing
for postmodern (GNU/Linux, over 3 years ago)

Installs but has some Ruby 1.9 incompatible code.

require 'rack'

Rack::Handler::WEBrick.run Proc.new { |env| [200, {'Content-Type' => 'text/html'}, env.inspect] }, :Port => 8080
[2009-02-05 15:24:38] INFO WEBrick 1.3.1
[2009-02-05 15:24:38] INFO ruby 1.9.1 (2009-01-30) [x86_64-linux]
[2009-02-05 15:24:38] WARN TCPServer Error: Address already in use - bind(2)
[2009-02-05 15:24:38] INFO WEBrick::HTTPServer#start: pid=4184 port=8080

# Browse to http://localhost:8080/

[2009-02-05 15:24:45] ERROR NoMethodError: undefined method `each' for "text/html":String
/usr/lib/ruby19/gems/1.9.1/gems/rack-0.9.1/lib/rack/handler/webrick.rb:47:in `block in service'

Add your comment




Yes No