Sinatra (software)
Web microframework for Ruby
title: "Sinatra (software)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["articles-with-example-ruby-code", "free-software-programmed-in-ruby", "software-using-the-mit-license", "web-frameworks"] description: "Web microframework for Ruby" topic_path: "technology/web" source: "https://en.wikipedia.org/wiki/Sinatra_(software)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Web microframework for Ruby ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | Sinatra |
| logo | Sinatralogo.png |
| author | Blake Mizerany |
| developer | Konstantin Haase |
| released | |
| latest release version | |
| latest release date | |
| operating system | Cross-platform |
| repo | |
| programming language | Ruby |
| genre | Web application framework |
| license | MIT License |
| website | |
| :: |
| name = Sinatra | logo = Sinatralogo.png | screenshot = | caption = | author = Blake Mizerany | developer = Konstantin Haase | released = | latest release version = | latest release date = | latest preview version = | latest preview date = | operating system = Cross-platform | platform = | language = | repo = | programming language = Ruby | genre = Web application framework | license = MIT License | website =
Sinatra is a free and open source software web application library and domain-specific language written in Ruby. It is an alternative to other Ruby web application frameworks such as Ruby on Rails, Merb, Nitro, and Camping. It is dependent on the Rack web server interface. It is named after musician Frank Sinatra.
Designed and developed by Blake Mizerany, Sinatra is small and flexible. It does not follow the typical model–view–controller pattern used in other frameworks, such as Ruby on Rails. Instead, Sinatra focuses on "quickly creating web-applications in Ruby with minimal effort." Because of much smaller size compared to Ruby on Rails, it is also called microframework.{{cite book |first1=Lucas |last1=Carlson |first2=Leonard |last2=Richardson |title=Ruby Cookbook: Recipes for Object-Oriented Scripting |publisher=O'Reilly Media |year=2015 |isbn=9781449373696 |url=https://books.google.com/books?id=oRqkBwAAQBAJ&q=Sinatra+microframework&pg=PA679}}
Some notable companies and institutions that use Sinatra include Apple, BBC, the British Government's Government Digital Service, LinkedIn, the National Security Agency, Engine Yard, Heroku, GitHub, Stripe, and Songbird. Travis CI provides much of the financial support for Sinatra's development.
Sinatra was created and open-sourced in 2007. It inspired multiple ports and similar projects in other programming languages, such as Express.js and Scalatra.
Mizerany and Heroku's Adam Wiggins introduced and discussed Sinatra at RubyConf 2008.
Example
::code[lang=ruby] #!/usr/bin/env ruby require 'sinatra'
get '/' do redirect to('/hello/World') end
get '/hello/:name' do "Hello #{params[:name]}!" end ::
References
References
- "Taking the Stage - Sinatra: Up and Running". Safaribooksonline.com.
- [http://sinatrarb.com/about.html Sinatra: About]
- [http://www.sinatrarb.com/intro.html Sinatra: Readme]
- [https://www.apple.com/opensource/ Open Source software used by Apple]
- [http://thechangelog.com/post/1205495359/zeitgeist-twitter-zeitgeist BBC Zeitgeist] {{webarchive. link. (2010-11-28)
- [http://radar.oreilly.com/2012/01/with-govuk-british-government.html O'Reilly radar: With GOV.UK, British government redefines the online government platform]
- [https://www.youtube.com/watch?v=qZcmF3yonjs JRubyfying LinkedIn's Front-end]
- [http://www.nsa.gov/public_info/media_center/careers/video/TheProgrammer/index.html NSA Careers: The Programmer] {{webarchive. link. (2013-12-16)
- (22 November 2011). "Open Source (Almost) Everything".
- [http://www.sinatrarb.com/wild.html Sinatra in The Wild]
- "Save Data Automatically with Ruby on Rails".
- [http://rubyconf2008.confreaks.com/lightweight-web-services.html Confreaks: RubyConf 2008] {{webarchive. link. (2009-03-31)
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::