From 2e5bb718fbb84a30dfa82a8302167b57e1b81c97 Mon Sep 17 00:00:00 2001 From: Nick Olds Date: Mon, 21 Mar 2016 00:34:06 -0400 Subject: [PATCH 1/2] adds if deploying from another branch --- common-errors.md | 10 ++++++++++ deploying-your-first-app.md | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/common-errors.md b/common-errors.md index ff3f2ba..4a767fa 100644 --- a/common-errors.md +++ b/common-errors.md @@ -15,6 +15,16 @@ The most common pitfalls when deploying to Heroku are: Your app must include both the `rails_12factor` and `pg` gems if you are deploying to production. +## Not Pushing From the Right branch + +When deploying your app via git to Heroku, by default Heroku looks for you to push from the `master` branch of your application. + +If you're trying to deploy from a branch other than master you want to use this syntax: + +``` +git push heroku :master +``` + #### Make sure you create your app with `rails new my-app-name -d postgresql`. This includes the `pg` gem for you. If you forget the `-d postgresql`, Rails will default to using SQLite3 for your database. This saves data in a file called `development.sqlite3` in your app's `db` folder. diff --git a/deploying-your-first-app.md b/deploying-your-first-app.md index 1193653..a7494aa 100644 --- a/deploying-your-first-app.md +++ b/deploying-your-first-app.md @@ -54,6 +54,12 @@ To actually deploy our code onto the new server, we simply push to this new remo $ git push heroku master ``` +> **Note** if you're trying to deploy from a branch other than master you want to use this syntax: + +``` +git push heroku :master +``` + After doing this, you'll see a LOT of stuff printed out in your Terminal. You're watching Heroku run `bundle install` and run the commands necessary to set up a Rails app. ## Troubleshooting From 418ee2dd902940718ad72a5d693e0da552ebf680 Mon Sep 17 00:00:00 2001 From: Nick Olds Date: Mon, 21 Mar 2016 00:51:30 -0400 Subject: [PATCH 2/2] removes redundancy --- common-errors.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/common-errors.md b/common-errors.md index 4a767fa..ff3f2ba 100644 --- a/common-errors.md +++ b/common-errors.md @@ -15,16 +15,6 @@ The most common pitfalls when deploying to Heroku are: Your app must include both the `rails_12factor` and `pg` gems if you are deploying to production. -## Not Pushing From the Right branch - -When deploying your app via git to Heroku, by default Heroku looks for you to push from the `master` branch of your application. - -If you're trying to deploy from a branch other than master you want to use this syntax: - -``` -git push heroku :master -``` - #### Make sure you create your app with `rails new my-app-name -d postgresql`. This includes the `pg` gem for you. If you forget the `-d postgresql`, Rails will default to using SQLite3 for your database. This saves data in a file called `development.sqlite3` in your app's `db` folder.