remote rejected master -> master (pre-receive hook declined)

后端 未结 21 1645
我在风中等你
我在风中等你 2020-11-30 01:31

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 u         


        
相关标签:
21条回答
  • 2020-11-30 01:59

    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).

    0 讨论(0)
  • 2020-11-30 02:07

    Specify the version of node The version of Node.js that will be used to run your application on Heroku, should also be defined in your package.json file. You should always specify a Node.js version that matches the runtime you’re developing and testing with. To find your version type node --version.

    Your package.json file will look something like this:

    "engines": { "node": "10.x" },

    It should work

    0 讨论(0)
  • 2020-11-30 02:10

    I got the same error and looked into activity. Where I found that I had two package lock files which was causing the error.

    0 讨论(0)
  • 2020-11-30 02:11

    In my case I had forgotten to use postgres in my production environment. I moved the sqlite3 gem into my development and test groups in my Gemfile. Everything worked after that.

    0 讨论(0)
  • 2020-11-30 02:12

    My initial error in overview building log was... /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/bin/support/ruby_compile:15:in' ! Push rejected, failed to compile Ruby app. ! Push failed`

    Through 2 days of trying...this worked heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs

    In part it was my proxy and the buildpack

    0 讨论(0)
  • 2020-11-30 02:12

    I got the same error when I ran git status :

    $ git status
    On branch master
    Your branch is ahead of 'origin/master' by 1 commit.
      (use "git push" to publish your local commits)
    nothing to commit, working directory clean
    

    To fix it I can run:

    $ git push and run 
    $ git push heroku master
    
    0 讨论(0)
提交回复
热议问题