Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on rails and Heroku problem

$ git push heroku master

I basically get this error message.

error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:falling-stone-505.git'

I'm very new to computer programming and ruby on rails so an "idiots" guide to solving this would be appreciated.

Thanks in advance.

like image 303
user605116 Avatar asked Feb 06 '11 08:02

user605116


People also ask

Why am I getting application error on Heroku?

"Application Error" or similar is always caused by your own application code. Routing errors will normally only surface themselves within the logs of your application. In most cases, you will be able to see the cause of the error there. To learn more about logging, please see our Logging article on DevCenter.

Does heroku support Ruby 3?

Heroku is capable of running Ruby applications across a variety of Ruby implementations and includes support for framework-specific workflows.

What is heroku in Ruby?

Heroku recognizes an app as a Ruby app by the existence of a Gemfile file in the root directory. The demo app you deployed already has a Gemfile , and it looks something like this: source 'https://rubygems.org' ruby '>= 2.5', '< 3.1' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '5.2.


2 Answers

You haven't committed anything to push yet. Try doing:

$ git add -A
$ git commit

Then try to push to Heroku again.

You might try following along with this tutorial, although I can't vouch for it. Most of the professional endeavors in this space are books.

like image 95
wuputah Avatar answered Oct 10 '22 17:10

wuputah


If you want your commits to be easier to track in the future, after

1.

$ git add -A

2.

instead of

$ git commit

you can use

$ git commit -m "add a message here such as FIRST COMMIT or PROBLEM WITH CONTACTS VIEW ADDRESS VARIABLE TYPO FIXED."

3. Then you can

$ git push heroku master
like image 41
knappen Avatar answered Oct 10 '22 18:10

knappen