Getting started with sinatra

Download sinatra eBook

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

Stats

33 Contributors: 4
Wednesday, September 14, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook