Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rack Error "Rack::Lint::LintError: Response body must respond to each"

Tags:

I'm going through the tekpub rack tutorial but when I try to run even a basic program in rack i get this error.

ERROR Rack::Lint::LintError: Response body must respond to each /Users/adam/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.3.4/lib/rack/lint.rb:19:in     `assert' /Users/adam/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.3.4/lib/rack/lint.rb:513:in `each' /Users/adam/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.3.4/lib/rack/body_proxy.rb:23:in `method_missing' /Users/adam/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.3.4/lib/rack/chunked.rb:23:in `each' /Users/adam/.rvm/gems/ruby-1.9.3-preview1/gems/rack-1.3.4/lib/rack/handler/webrick.rb:71:in `service' /Users/adam/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service' /Users/adam/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run' /Users/adam/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread' 

This is the program im trying to run:

class EnvironmentOutput    def call(env)      ["200",{"Content-Type" => "text/plain"}, "Hello World"]   end  end  run EnvironmentOutput.new 

I'm a beginner programmer so I'm not sure whats going on. Tried google searches but nothing has come up.

Using ruby 1.9.3 Rack 1.1

Thanks