Sinatra examples that appear in my Packtpub book (http://www.packtpub.com/sinatra-starter/book)
Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
spec
views
.gitignore
Gemfile
Gemfile.lock
Guardfile
README.md
address-book.rb
config.ru

README.md

sinatra-address-book

An example program of various Sinatra functionality.

Installation

Install Ruby gems:

bundle install --path=./vendor/bundle

Develop

Run the server:

bundle exec rackup -p 3000

Heroku

Database setup:

heroku addons:add heroku-postgresql:dev

Note the name of the environment variable, e.g. HEROKU_POSTGRESQL_ROSE_URL

heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL