I'm working in rails 3.2 and I receive an error when I try to push to heroku:
git push heroku master Counting objects: 496, done. Delta compression using up to 8 threads. Compressing objects: 100% (435/435), done. Writing objects: 100% (496/496), 5.17 MiB | 249 KiB/s, done. Total 496 (delta 125), reused 216 (delta 8) -----> Heroku receiving push -----> Removing .DS_Store files ! Heroku push rejected, no Cedar-supported app detected To [email protected]:lumeo.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to '[email protected]:lumeo.git'
I have tried the few methods recommended on this forum, including emptying and reinstalling the Gems and deleting and adding the remote, to no avail.
any suggestions?
If your master branch is protected, you will get the gitlab ! [remote rejected] master -> master (pre-receive hook declined) error. Unprotect your master branch to solve the issue. If you can't push code directly to the master and get errors, you need to be the maintainer of the repo.
Your commits were rejected by the pre-receive hook of that repo (that's a user-configurable script that is intended to analyze incoming commits and decide if they are good enough to be accepted into the repo). It is also a good idea to ask that person to update the hook, so it would print the reasons for the rejection.
Pre-receive hooks enforce rules for contributions before commits may be pushed to a repository. Pre-receive hooks run tests on code pushed to a repository to ensure contributions meet repository or organization policy. If the commit contents pass the tests, the push will be accepted into the repository.
To force a push to only one branch, use a + in front of the refspec to push (e.g git push origin +master to force a push to the master branch).
Make sure that your Rails app is in the root of the repo, the Gemfile is present and properly named. It is basically not able to detect your code base as one of the supported project types and hence failing it. Also, even if you do have a proper project, make sure it is part of the repository and you have committed it fine (git status
will help you here and a ls
should help you verify the project structure).
In Heroku, you may have problems with pushing to the master branch. What you can do is to start a new branch using
git checkout -b tempbranch
and then push using
git push heroku tempbranch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With