Skip to content

Instantly share code, notes, and snippets.

@tealtail
Forked from phlco/basic heroku sinatra setup
Last active December 25, 2015 07:39
Show Gist options
  • Save tealtail/6941103 to your computer and use it in GitHub Desktop.
Save tealtail/6941103 to your computer and use it in GitHub Desktop.
Pushing to Heroku
-----------------
Install Heroku
Create an account on Heroku
Install the Heroku Toolbelt
$ heroku login
Enter your Heroku credentials.
Email: adam@example.com
Password:subl
Could not find an existing public key.
Would you like to generate one? [Yn]
Generating new SSH public key.
Uploading ssh public key /Users/adam/.ssh/id_rsa.pub
Sinatra Heroku Deployment Steps
------------------------------
Setting up your App
Create a config.ru
---
#config.ru
require './main'
run Sinatra::Application
Create a Gemfile
---
$ bundle init
List the gems your app requires
---
# Gemfile
gem 'sinatra'
gem 'httparty'
Generate Gemfile.lock
---
$ bundle
Create a Procfile
---
$ touch Procfile
# Procfile
web: bundle exec ruby main.rb -p $PORT
Deploying
--------------------
Create a new Git repository
---
$ git init
Create a new Heroku repository
---
$ heroku create
Add and commit your changes
---
$ git add .
$ git commit -am 'pushing to heroku'
Push to heroku
---
$ git push heroku master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment