A must-see for those who don't understand the second Heroku deployment!

Currently working on Rails tutorials

This time, the first deployment went smoothly, but in the second exercise I ended up getting a disease that I didn't know what to do.

I solved it by google, so if you are in the same situation, beginners will explain it in an easy-to-understand manner!
Thank you!

First of all, the content of the exercise, but to explain briefly

"Do you want to change the characters that are currently displayed? Also change the routing."

Why is this licking problem easy? I thought that I actually changed the routing and display contents ....

As it is

$ git push heroku

Is it okay

I was the one who licked Sumimasen

Yes, it always fails. I couldn't do it ww Let's get into the explanation. First, remember to commit your changes to git and push.
  1. First, change the contents of the app

  2. Check the status of the branch

$ git status 

3.commit

$ git commit -a -m "Comments on changes" 

Commit with

  1. And finally push
$ git push 
If you can't
$ git push origin master
(If master is main, enter main) 

Finally deploy

Once you've done that, let's deploy to Heroku as a finishing touch.
$ git push heroku

If you get this error with this command (I got it) Username for'https://git.heroku.com/stark-oasis-numbers.git': username Password for'https://[email protected]/stark-oasis-numbers.git': remote: ! WARNING: remote: ! Do not authenticate with username and password using git. remote: ! Run heroku login to update your credentials, then retry the git command. remote: ! See documentation for details: https://devcenter.heroku.com/articles/git#http-git-authentication fatal: Authentication failed for 'https://git.heroku.com/stark-oasis-15325.git/'

Maybe

"Don't type this command without logging in to heroku!"

I interpreted that you were angry with something like that, so

$ heroku login

Let's log in with.

And at this time, this kind of thing may come out, (I came out w)

heroku: Press any key to open up the browser to login or q to exit:

This will probably be

"Because I log in with a browser, press some key to open the browser and log in."

I don't think I'm saying anything like that, but for the time being, it seems that you can't log in from a command. I'll add this option

$ heroku login --interactive

I think you will succeed if you enter!

Then

Email [email address]: (If you see the address registered on your heroku here, just press enter I was out. If not, enter the registered address! ) Password: heroku password

Now that you've logged in on Heroku, Finally here

$ git push heroku

If you enter, the deployment will be completed in a few tens of seconds, so let's open the URL and check it!

Thank you for your time! !!

Recommended Posts

A must-see for those who don't understand the second Heroku deployment!
I put in a gem bullet (for those who don't notice the N + 1 problem themselves)
A note for those who live with JMockit
[Swift, a must-see for fledgling! ] Let's understand the implementation of communication processing of WebAPI
Create an Android app for those who don't want to play music on the speaker
For those who have deleted a document in Firestore but the subcollection does not disappear