Launching Sinatra on Heroku

Become a Subscriber

Sinatra is a great solution for small and nibble ruby web applications. While Heroku is awesome for all things hosting. Today I will show you how to quickly deploy your Sinatra application to Heroku. Deploying a Sinatra App on Heroku is super simple.


I am assuming you already have a Sinatra app you are ready to deploy along with the heroku cli tool belt (


Go inside your project folder and create two root files:


Inside Gemfile let Heroku know you are on Sinatra:

source ‘'
gem ‘sinatra’

The is a rackup file for running Rack-based apps and should look something like this if your file is called app.rb:

require ‘./app’
run Sinatra::Application


heroku create
git add .
git commit -m “Deploy Sinatra to Heroku”
git push heroku master
heroku open

Let us know if you run into any trouble or if this works well for your existing projects.