About

Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort:

This application is a boilerplate mixture of Sinatra DSL readied with latest front-end framework Twitter Bootstrap and Javascript library jQuery.

Installation

Download repositiory

$ git clone git@github.com:michaelminter/sinatra-boilerplate.git --origin newprojectname

Change directory

$ cd newprojectname/

Create RVM environment (if installed)

$ rvm --rvmrc --create 1.9.2@newprojectname

Confirm RVM setup

$ gem env gemdir

If you have bundler installed

bundle install

Run this application

$ shotgun app.rb

and load http://0.0.0.0:9393 in your browser

or

$ ruby app.rb

and load http://0.0.0.0:4567 in your browser

Shotgun (available in Gemfile) will actually restart your application on every request. This has the advantage over other reloading techniques of always producing correct results. However, since it actually restarts your application, it is rather slow compared to the alternatives. Moreover, since it relies on fork, it is not available on Windows and JRuby.