Sinatra Boilerplate

A standard, Heroku ready Sinatra boilerplate, with Compass and Sass.

This project is maintained by superhighfives

Sinatra Boilerplate

A standard Sinatra boilerplate, with Compass and Sass.

This is a Heroku ready Sinatra app put together by Charlie Gleason (with help from John Barton).

Getting things up and running

To get the boilerplate running, grab a copy locally.

Navigate to the directory you downloaded Sinatra Boilerplate, and run the following:

# Install the appropriate Ruby gems (shorthand for bundle install)
> bundle

# Start the server
> foreman start

The app will now be accessible at

Getting it onto Heroku

To deploy to Heroku, first up, install the Heroku Toolbelt.

This will give you access to the following tools:

Sign up for Heroku and login

Once you have an account for Heroku run the following in your terminal.

# Once you've installed the Heroku toolbelt, log in
> heroku login

This will ask for your Heroku credentials.

# Enter your Heroku credentials.
> Email:
> Password: ********

If you already have an SSH key set up on your local machine, you'll likely see the following. Heroku will help you set up a key, which makes deployment much quicker, meaning you don't have to enter your password every time you deploy. Win.

# If you haven't set up keys, Heroku will help you out. For example:
# Could not find an existing public key.
> Would you like to generate one? [Yn]
# Generating new SSH public key.
# Uploading ssh public key /Users/you/.ssh/

If you get a publickey error (access denied) when you try and push the site to Heroku, add your public key manually.

# Add your public key to Heroku manually
> heroku keys:add

Next up, we set up the app and deploy it.

Deploy the app

Set up your Heroku stack and deploy the app to it.

> heroku create
# Creating temp... done, stack is cedar
# |
# Git remote heroku added

# Deploy the app
> git push heroku master

# Celebrate!
> heroku open


Name it something fancy!

You can rename the app from the randomly generated to something more meaningful using:

# Rename your subdomain
> heroku rename newname


This can be more awesome. I am sure of it. Fork it and get involved.