Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Michelle Cannito
Michelle Cannito
8,992 Points

Help! git push heroku master failed, no Cedar-supported app detected + more errors

This is a copy/paste from my Windows command prompt:

C:\staging\statbook>heroku create
Creating sleepy-waters-5813... done, stack is cedar
http://sleepy-waters-5813.herokuapp.com/ | git@heroku.com:sleepy-waters-5813.git

C:\staging\statbook>git push heroku master
Initializing repository, done.
Counting objects: 346, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (197/197), done.
Writing objects: 100% (346/346), 111.39 KiB | 0 bytes/s, done.
Total 346 (delta 107), reused 346 (delta 107)

 !     Push rejected, no Cedar-supported app detected

To git@heroku.com:fast-hamlet-6924.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:fast-hamlet-6924.git'


The following shows changes to Gemfile and database.yml that were previously pushed to github, and, after many, many hours of still failing, what I did today.

Today I created a new directory, staging, and did a

git clone https://github.com/jazzminjoy/statbook

into it, but it's still the same problem.

I had C:\staging\statbook\statbook, so then I copied the contents of the 2nd inner directory into the first and deleted the 2nd statbook. The commands at the top of this post followed.

This is the part of my Gemfile on github:

group :development, :test do
    gem 'sqlite3'

group :production do
    gem 'pg'
    gem 'rails_12factor'

This is my database.yml file on github:

  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

  adapter: postgresql
  database: db/production.postgresql
  pool: 5
  timeout: 5000

Please help me get my app online! I need it for a portfolio to get into an apprentice program which pays while you learn on the job.

Thank you in advance.

Michelle Cannito
Michelle Cannito
8,992 Points

Lots of progress!

When I deleted C:\staging\statbook\statbook after first moving the contents to C:\staging\statbook, I did

bundle install --without production

git status

git add .

git commit -m "Moved statbook contents to C:\staging\statbook and deleted C:\staging\statbook\statbook."

git push heroku master

result: http://fast-hamlet-6924.herokuapp.com/ deployed to Heroku


The site says, "We're sorry, but something went wrong."

I then did: heroku run rake db:migrate

and got a "Heroku client internal error." Error: EOFError

I figure that's an end of file error, and it is because there is no data in the database.

So, I am going to run my app on localhost from the new staging directory and put some data in, then will rerun the db:migrate.

I'll keep everyone posted. If this post helps someone, please give it a +1 rating.

Edit: renamed app http://joyriding-rails-statbook.herokuapp.com/

2 Answers

Michelle Cannito
Michelle Cannito
8,992 Points

Oh my! Wow! I am so thrilled! It's working!

The final fix: from my C:\staging\statbook> windows command prompt, do this:

rake db:migrate

Then do this:

heroku run rake db:migrate

Check it out at http://fast-hamlet-6924.herokuapp.com/feed

If this thread helped you, or just to be friendly, please register and leave a status comment.

Summary Overview of Getting Herku Push to Work:

  1. Update database.yaml file as shown in first post on this thread
  2. Update Gemfile as shown in first post on this thread
  3. Do this: bundle install --without production
  4. Do git status, git add . , git commit -am "Use postgresql and pg for production environment", and git push
  5. Create a new directory just off your main root directory. Mine was C:\staging
  6. Change directory into it
  7. Go to github, copy your url, then, into your directory, do this: git clone your_full_github_url
  8. Do these: git status, git add ., and git commit -am
  9. Do this: git push heroku master
  10. Check your new url online. It will say that something went wrong.
  11. Do this: rake db:migrate
  12. Do this: heroku run rake db:migrate,
  13. Check your site online.
  14. Celebrate and let me know if I helped you.