-
-
Save tealtail/6941103 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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