use Rack::Static, :urls => ['/stylesheets', '/images'], :root => 'public'
run proc { |env| [200, { 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' }, File.open('public/index.html')] }
I get private method `open’ called for Rack::File:Class when I rackup. Really can’t see where the problem is. Running rack 1.1. Help please…
There is a
Rack::Fileclass, which has precedence in your rackup file because of the way Ruby looks up names. This is not the class you are looking for, you want Ruby’s ownFileclass. That class can be referenced directly without lookup ambiguity by using the prefix::