I have an exact same code deployed on heroku app. I update the heroku stack to 18 but now as the build is required before the new stack to take place I am getting the below error.
I tried all different scenarios including force push git push heroku master:main -f but nothing seems to be working.
here are the error logs that comes just before build is about to complete.
remote: -----> nginx-buildpack app detected
remote: cp: cannot stat 'bin/nginx-heroku-18': No such file or
directory
remote: ! Push rejected, failed to compile nginx-buildpack app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to my-app-prod.
remote:
To https://git.heroku.com/my-app-prod.git
! [remote rejected] HEAD -> master (pre-receive hook
declined)
error: failed to push some refs to
'https://git.heroku.com/my-app-prod.git'
I figured out the problem and answering my own question in case it might save someone's time.
Actually, there were multiple NGINX buildpacks in my Heroku app and they were causing issues while updating to Heroku stack-18. In my case, removing one of the nginx-buildpack solved my issue.
Related
I tried adding action text by following this: https://stackoverflow.com/a/55983943.
Everything worked fine in development.
But when I try to push it to heroku by running git push heroku, I get this error:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sampleapp.
remote:
remote:
To https://git.heroku.com/sampleapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sampleapp.git'
I tried adding
config.assets.initialize_on_precompile = false
to config/application.rb but it didn't work
Its already added to config/environments/production.rb.
I tried running RAILS_ENV=production bundle exec rake assets:precompile
but it gave me this error:
ExecJS::RuntimeError: SyntaxError: Unexpected token: string (actiontext)
JS_Parse_Error.get ((execjs):3538:621)
So, how do I resolve this error?
This probably sounds dumb but I solved the problem now.
What worked was changing
config.assets.js_compressor = :uglifier
in config/environments/production.rb to
config.assets.js_compressor = Uglifier.new(harmony: true)
I'm following this thoughtbot ember-cli-rails guide but cannot get the heroku deploy working. I did have to change bin/heroku_install to remove the lines about bower, and other than that, this is following the setup guide.
I don't see any visible errors in the heroku output so I'm at a loss as to where to go next:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to enigmatic-savannah-87434.
remote:
To https://git.heroku.com/enigmatic-savannah-87434.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/enigmatic-savannah-87434.git'
The entire deploy log is here if you have the time and will to have a look. Thanks in advance
My next idea is try the sample app, deploying that, and comparing the two projects to see what I may have added that isn't playing nice. Will report back how that goes...
I'm attempting to deploy my Ruby on Rails application that is currently on branch "rails_app" (as shown below). I have successfully deployed it before, but it is now not working with additional changes. When I manually look for buildpacks by running "heroku buildpacks," it indicates the correct one is there. [When I try to reinstall the buildpack, it also says it is already there] When I attempt to push to heroku I receive the failure to detect set buildpath as shown below.
Dougs-MBP-2:Rails_Application Doug$ heroku buildpacks
app_name Buildpack URL
heroku/ruby
Dougs-MBP-2:Rails_Application Doug$ git branch
gh-pages
master
* rails_app
update
Dougs-MBP-2:Rails_Application Doug$ git push heroku rails_app:master
Counting objects: 70, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (70/70), 217.85 KiB | 0 bytes/s, done.
Total 70 (delta 46), reused 0 (delta 0)
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
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to app_name.
remote:
To https://git.heroku.com/app_name.git
! [remote rejected] rails_app -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/app_name.git'
Thanks for your help.
It seems you are setting a custom buildpack: "https://codonbuildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz" but when I visit that link it says that no bucket with that name exists which means that heroku can't detect your custom buildpack and fails.
You can read more about how to specify custom buildpacks here: https://devcenter.heroku.com/articles/buildpacks#detection-failure
The ruby buildpack that heroku uses is on this page:
https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-ruby
I'm trying to push my rails project onto heroku but I keep receiving this message:
remote: ! Heroku Git error, please try again shortly.
remote: ! See http://status.heroku.com for current Heroku
platform status.
remote: ! If the problem persists, please open a ticket
remote: ! on https://help.heroku.com/tickets/new
remote: ! and provide the Request ID
a0ec0d23-526d-4482-a06e-88129776d9af
remote:
To https://git.heroku.com/gracepinteresting.git ! [remote rejected]
master -> master (pre-receive hook declined) error: failed to push
some refs to 'https://git.heroku.com/gracepinteresting.git'
Here's a link to the project at github: https://github.com/gracek93/pinteresting
What am I doing wrong?
heroku has difficulty today. The better now is wait for that Heroku fix their bugs. Check heroku status here
I'm trying to push my RoR to Heroku for the first time (I'm a newbie on this stuff!)
The error that I'm getting is:
-----> Heroku receiving push
! Heroku push rejected, no Cedar-supported app detected
To git#heroku.com:calm-retreat-9405.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:calm-retreat-9405.git'
Double check if you committed correctly your Gemfile and config.ru