sinatra

Getting started with sinatra

Remarks#

Sinatra is a simple Ruby DSL for quickly creating web applications.

It has built in features for routing, using templates, serving static files, helpers, error handling and many other topics.

https://www.sinatrarb.com/intro.html

Versions#

VersionRelease Date
2.0.0beta22016-08-22
2.0.0beta12016-08-22
1.4.72016-01-24
1.4.02013-03-15
1.3.02011-10-01
1.2.02011-03-02
1.1.02010-10-23
1.0.02010-03-23
0.9.02009-01-18
0.3.02008-08-31
0.2.02008-04-11
0.1.02007-10-04

Installation

You can install Sinatra as a global gem:

gem install sinatra

or add it to a project’s Gemfile

# in Gemfile:
gem 'sinatra'

and run bundle install.

Your first Sinatra app

# app.rb
require 'sinatra'

get '/' do
    'Hello, Universe!'
end

Install Sinatra:

gem install sinatra

Run the app:

ruby app.rb

That’s it! Access your app at https://localhost:4567


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow