0

I am trying to deploy a basic app from Github to Heroku.

Following directions from Heroku's guide

Here's the thing. When I clone from the github repository, I clone a specific branch that's 8 commits ahead of master.

The reason why I clone that specific branch is that it's the most advanced on. Each branch is built upon the previous branch.

I don't want to merge that branch into the master because I don't know how to undo that.

By the time I try to do this step from the guide above: heroku ps:scale web=1, I always get this: Scaling dynos... failed ! App must be deployed before dynos can be scaled.

Why does this happen? Advice?

Please let me know if this question needs further clarification. Thank you.

EDIT

For the record, it has the Procfile which has this in it: web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb

EDIT 2

When I do git push heroku branch_name - this is what I get:

Delta compression using up to 4 threads.
Compressing objects: 100% (243/243), done.
Writing objects: 100% (389/389), 727.55 KiB | 0 bytes/s, done.
Total 389 (delta 111), reused 389 (delta 111)
remote: Pushed to non-master branch, skipping build.

EDIT 3

I followed the first answer from this thread.

It worked, and restarted the app in Heroku.

But I restarted it again with this line: heroku restart --app name_of_app_in_heroku and got this: Restarting dynos... done

Then I tried to do heroku open --app name_of_app_in_heroku, and all I get is the basic welcome page. How do I overcome this?

Also, I just looked at my Heroku's dashboard, and checked the app, and it says it has no dynos. How is that possible?

EDIT 4

Also, I just ran this command: heroku pg:info and got this answer: name_of_app_in_heroku has no heroku-postgresql databases.

But that shouldn't be, I can see the DB's URL in the app's config vars in the settings of the app's dashboard.

2 Answers 2

2

It sounds like the app's never been deployed (because you're trying to deploy non master branch and heroku has been ignoring the pushes)

When you push to heroku, the name for the branch needs to be master on the heroku side.

By default git push keeps the same name for both sides:

git push heroku some_branch

Tries to (assuming upstream is setup appropriately etc) update a branch called "some_branch" on the heroku remote, with your local branch of the same name.

To use a different name you'd do

git push heroku some_branch:master

Which means push the changes from the branch called some_branch locally to heroku's master branch

Sign up to request clarification or add additional context in comments.

1 Comment

thanks. (blah blah blah added here for the required extra characters!)
0

When you deploy your app try doing this

 gp heroku master -f
 heroku run rake db:migrate --app APPNAME
 heroku restart --app APPNAME
 heroku open --app APPNAME

This are the lines that I use when I deploy a project to Heroku

8 Comments

just saw your answer. Before I run your lines, you did see the part where I said that I'm not deploying from master branch but from a branch that's 8 commits ahead? Double-checking because I'm a little worried what would happen if this backfires.
how far ahead is your app than what is on heroku?
what's on the app is on the Heroku, i.e., the cloned branch from Github. That's why I do git push heroku instead of git push heroku master
when I said it's 8 commits ahead, I'm referring to Github. Hence me trying to push up a cloned branch to Heroku.
for what it's worth, when I push the cloned branch to Heroku, it seems to work.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.