class Rack::Builder
def self.load_file(path, **options)
require './app.rb'
use Rack::ContentLength
$ cat config.ru
Example config.ru file:
use of +__END__+ will not result in a syntax error.
Ignores content in the file after +__END__+, so that
contents as if specified inside a Rack::Builder block.
Load the given file as a rackup file, treating the
def self.load_file(path, **options) config = ::File.read(path) config.slice!(/\A#{UTF_8_BOM}/) if config.encoding == Encoding::UTF_8 if config[/^#\\(.*)/] fail "Parsing options from the first comment line is no longer supported: #{path}" end config.sub!(/^__END__\n.*\Z/m, '') return new_from_string(config, path, **options) end