Heroku Push Fail - heroku

When I try to deploy the branch in heroku, I get this error:
-----> Building on the Heroku-22 stack
-----> Using buildpack: heroku/python
-----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
I do have a Procfile and a requirements.txt file in the root directory. Any idea what the issue may be?

Related

Failed to deploy Heroku

I cannot deploy my app on Heroku as this is the error that I am getting;
I used this website to deploy my app to Heroku => https://betterprogramming.pub/deploy-your-app-for-free-in-7-easy-steps-thanks-to-heroku-dfd0f387edd0
Got this message;
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/nodejs
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
remote:
remote: ! ERROR: Application not supported by 'heroku/nodejs' buildpack
remote: !
remote: ! The 'heroku/nodejs' buildpack is set on this application, but was
remote: ! unable to detect a Node.js codebase.
remote: !
remote: ! A Node.js app on Heroku requires a 'package.json' at the root of
remote: ! the directory structure.
remote: !
remote: ! If you are trying to deploy a Node.js application, ensure that this
remote: ! file is present at the top level directory. This directory has the
remote: ! following files:
remote: !
remote: ! client/
remote: ! Procfile
remote: ! README.md
remote: ! smart_contract/
remote: !
remote: ! If you are trying to deploy an application written in another
remote: ! language, you need to change the list of buildpacks set on your
remote: ! Heroku app using the 'heroku buildpacks' command.
remote: !
remote: ! For more information, refer to the following documentation:
remote: ! https://devcenter.heroku.com/articles/buildpacks
remote: ! https://devcenter.heroku.com/articles/nodejs-support#activation
remote:
remote:
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to arcane-springs-89425.
remote:
To https://git.heroku.com/arcane-springs-89425.git
The code “git push heroku master” fails for the push-and-deploy process. I haven’t been given an URL where I could see my app.
Steps I took ;
change the buildpack to node.js (I'm using blockchain, stability, metamask)
git add Procfile
git commit -a -m "Configuration to deploy to heroku"
git push heroku master
The website https://git.heroku.com/arcane-springs-89425.git says "Method Not Allowed" in on a blank page.

Deploying a sinatra app produced on a mac to Heroku

I have built a simple sinatra web app on my macbook. The deployment to heroku fails with the logs below. The problem is that I've already implemented their suggested fix (bundle lock --add-platform x86_64-linux) and I still get the same error message.
Any suggestions as to next steps would be very welcome. Thanks in advance.
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Ruby app detected
-----> Installing bundler 2.2.33
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rack
-----> Using Ruby version: ruby-2.7.5
-----> Installing dependencies using bundler 2.2.33
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
Your bundle only supports platforms ["arm64-darwin-20"] but your local platform
is x86_64-linux. Add the current platform to the lockfile with `bundle lock
--add-platform x86_64-linux` and try again.
Bundler Output: Your bundle only supports platforms ["arm64-darwin-20"] but your local platform
is x86_64-linux. Add the current platform to the lockfile with `bundle lock
--add-platform x86_64-linux` and try again.
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app.
! Push failed
*Update
My local repo, with x86_64-linux in Gemfile.lock, is out of sync with the remote repo on github that I have been trying to deploy from. Other files are out of date too. Concerningly, I have both pushed and pulled recently, as well as deleted the remote repo, created a new one and pushed again. Git is telling me that both the local and the remote repos are up to date with each other, when they are obviously not.
I've tried pushing directly to heroku from the command line but hit the same platform error as above.

Git can't find set buildpack

So I am learning how to use git with Heroku and I can't seem to git push my set repo. So I set the buildpack to ruby with Heroku as ruby by doing so..
root#slacker:~/ruby# heroku buildpacks:set heroku/ruby
Buildpack set. Next release on stormy-earth-98069 will use heroku/ruby.
Run git push heroku master to create a new release using this buildpack.
Next I try to update my repo using git push and I get an error saying this..
root#slacker:~/ruby# git push heroku master
...
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
...
So I am wondering what could cause git to do this?
Your question has the answer. According docs, looks like the directory from where you are running 'git push' doesn't have Gemfile.

Heroku rejecting my app all of a sudden (env: bundle: No such file or directory)

I tried deploying my application today and my deployments are for the first time being rejected.
My deployment output is below. I've tried the following with no change in outcome:
Deploying with no Ruby version in Gemfile
Deploying with 2.1.0 in Gemfile
Deploying using a custom BUILDPACK_URL at https://github.com/heroku/heroku-buildpack-ruby.git
Deploying from a different branch
Deploying from a teammate's machine
Rolling back to last successfully deployed commit, changing a line in the README, committed and redeployed.
I had successfully deployed just last night. I only have made HTML and CSS changes to the new code I want to commit, so nothing in the app settings has been changed since the last successful deployment.
Why would Heroku be now rejecting my app deployments?
Thanks!
Fetching repository, done.
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 496 bytes, done.
Total 6 (delta 5), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
env: bundle: No such file or directory
Bundler Output: env: bundle: No such file or directory
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:myapp.git
! [remote rejected] development -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myapp.git'
Heroku dropped support for Rails 1.9 and that was in the PATH. I had some trouble dropping the PATH because heroku had some hack where it was configured, but would not drop (probably because it was a default).
So I ended up setting the PATH to something
heroku config:set PATH=blah
and then unsetting it.
heroku config:remove PATH
That seems to have stuck.

Using ruby and graphviz on heroku with heroku-buildpack-multi

I'm trying to deploy my app on heroku. I use declarative_authorization with graphical visualisation.
I installed https://github.com/ddollar/heroku-buildpack-multi heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi and created .buildpacks with:
https://github.com/stigkj/heroku-buildpack-graphviz.git
https://github.com/heroku/heroku-buildpack-ruby.git
Building works fine:
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/stigkj/heroku-buildpack-graphviz.git
=====> Detected Framework: graphviz
-----> Fetching and installing graphviz
grapvhiz installed
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
But now I get when I access the graph:
Errno::ENOENT in AuthorizationRulesController#graph
No such file or directory - dot -q -Tsvg
What is the correct path?
Use https://github.com/gokceneraslan/heroku-buildpack-graphviz instead of https://github.com/stigkj/heroku-buildpack-graphviz.git.
Then, add this configuration:
heroku config:add PATH:/usr/local/bin:/usr/bin:/bin:/app/bin
Source: https://github.com/pygram/pygram#deployment-on-heroku
https://github.com/weibeld/heroku-buildpack-graphviz is a stable buildpack for Graphviz (see instructions there).
It automatically adds the location of dot and other Graphviz executables to the PATH.

Resources