Skip to content

Instantly share code, notes, and snippets.

@phlco
Created October 11, 2013 16:27
Show Gist options
  • Save phlco/6937817 to your computer and use it in GitHub Desktop.
Save phlco/6937817 to your computer and use it in GitHub Desktop.
pushing to heroku
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 Steps
In your App
Create a config.ru
#config.ru
require './main'
run Sinatra::Application
Create a Gemfile
$ bundle init
# Gemfile
gem 'sinatra'
gem 'httparty'
Create a Gemfile.lock
$ bundle
Create a Procfile
$ touch Procfile
# Procfile
web: bundle exec ruby main.rb -p $PORT
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