sinatra Getting started with sinatra

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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.

http://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 http://localhost:4567



Got any sinatra Question?