Docs

Sinatra

Sinatra is supported as a plain Rack app, the lightest of the three frameworks. It shares the packaged boot path with Hanami.

Detected by

An app is treated as Sinatra when it has a config.ru and its Gemfile depends on sinatra.

Requirements

  • Sinatra 3+ on Ruby 3.2+, with a config.ru.
  • The standard toolchain: Rust, a C/C++ compiler, and rbe-tebako.
  • For local mode, SQLite if you need a database (the example-sinatra/ app uses Active Record + SQLite).

How it boots

Sinatra boots through the shared Rack path: the packaged app loads your config.ru Rack app, prepares the database if you have one, and serves it on 127.0.0.1 with Puma. Packaged runs set RACK_ENV=production.

Development

Terminal bash
every dev        # runs bin/dev, or `rackup` if you have no bin/dev

Sinatra has no asset pipeline by default, so there's nothing to precompile.

Notes

  • No inline scripts. The native shell's content-security policy forbids inline <script>. Serve the bridge and your JavaScript as external files rather than inline tags.
  • See the example-sinatra/ app in the repo for a working reference.
Rails · Hanami · Sinatra — built with Ruby