Errors with "git push heroic master", what to do? - ruby-on-rails

So i'm trying to deploy my rails app through heroku. But every time i run "git push heroic master", i run into this. I have searched around, but nothing seems to work. I have tried to "bundle update", "bundle install", but i still get this error when i run "git push heroic master"
Counting objects: 84, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (84/84), 20.65 KiB | 1.88 MiB/s, done.
Total 84 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.3.4
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote: The dependencies in your gemfile changed
remote: You have added to the Gemfile:
remote: * pg
remote: Bundler Output: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: The dependencies in your gemfile changed
remote:
remote: You have added to the Gemfile:
remote: * pg
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to secret-mesa-55611.
remote:
To https://git.heroku.com/******
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/*******.git'

It seems that your Gemfile.lock is changed. Try running bundle install after cleaning the Gemfile.lock

Related

Heroku Deploying: Failed to install gems via Bundler

While trying to deploy my app to heroku, I get this error:
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.3.10
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.7.5
remote: -----> Installing dependencies using bundler 2.3.10
remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote: Your bundle only supports platforms ["x86_64-darwin-21"] but your local platform
remote: is x86_64-linux. Add the current platform to the lockfile with
remote: `bundle lock --add-platform x86_64-linux` and try again.
remote: Bundler Output: Your bundle only supports platforms ["x86_64-darwin-21"] but your local platform
remote: is x86_64-linux. Add the current platform to the lockfile with
remote: `bundle lock --add-platform x86_64-linux` and try again.
remote:
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: b841b157d86386b34d46224f6f00301501c82b49
remote: !
remote: ! We have detected that you have triggered a build from source code with version b841b157d86386b34d46224f6f00301501c82b49
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to radiant-citadel-26297.
remote:
To https://git.heroku.com/radiant-citadel-26297.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/radiant-citadel-26297.git'
I have already tried
bundle lock --add-platform x86_64-linux
but didnt work. I have also tried to solve it with other methods, such as "bundle lock --add-platform ruby", with no success.
Please help!
The problem I had was that I was did not added, commited and pushed. This solved the issue: '
bundle lock --add-platform x86_64-linux
git add -A
git commit -m 'Add platform'
git push
'

"Push rejected, failed to compile Ruby app" installation of decdim on herouku

I'm trying to install decidim (decidim.org) on herouku, I get this error when i make the deploy
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run bundle install elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: The gemspecs for path gems changed
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
this is the end lines of the deploy.
anyone has an answer for this issue?
thanks
Go to the folder where you have your app and try typing the command: bundle install then try pushing to heroku afterwards.

Heroku push rejected because gem checksum failed

I've been pushing updates to my app successfully all week. This morning I went to push another update (just some CSS changes) and suddenly I'm my pushes are being rejected because the checksums on numerous gems seem to be randomly failing. I say randomly because each time I've tried pushing, the failing checksums are for different gems.
I'm not sure if this is a problem with Bundler, RubyGems, or Heroku, but those all seem like obvious candidates. I can't find any mention of similar issues and Heroku seems to have eliminated the ability to submit a support ticket unless you pay for an enterprise support plan.
Any help is greatly appreciated!
Here is the log from the last attempt:
$ git push heroku master
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.55 KiB | 1.55 MiB/s, done.
Total 12 (delta 10), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> nginx-buildpack app detected
remote: -----> nginx-buildpack: Installed nginx/1.5.7 to app/bin
remote: -----> nginx-buildpack: Added start-nginx to app/bin
remote: -----> nginx-buildpack: Default mime.types copied to app/config/
remote: -----> nginx-buildpack: Default config copied to app/config.
remote: -----> Image-Optim Buildback app detected
remote: -----> Adding Item-Optim binaries
remote: cp: omitting directory ‘jpegoptim’
remote: ‘advpng’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/advpng’
remote: ‘gifsicle’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/gifsicle’
remote: ‘jpegtran’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/jpegtran’
remote: ‘optipng’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/optipng’
remote: ‘pngcrush’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/pngcrush’
remote: ‘jpegoptim/jpegoptim-cedar14’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/jpegoptim’
remote: -----> Adding image-optim binaries symlink to make them available in next buildpacks
remote: -----> Adding image-optim binaries to PATH
remote: ‘image-optim.sh’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/.profile.d/image-optim.sh’
remote: -----> Gemfile detected, adding image-optim config file
remote: ‘image_optim.yml’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/.image_optim.yml’
remote: -----> Image-Optim binaries version
remote: advancecomp v1.18 by Andrea Mazzoleni
remote: LCDF Gifsicle 1.78
remote: jpegoptim v1.4.2 x86_64-unknown-linux-gnu
remote: libjpeg-turbo version 1.2.90 (build 20130305)
remote: OptiPNG version 0.7.4
remote: | pngcrush 1.7.15
remote: -----> ImageMagick app detected
remote: -----> Install ImageMagick
remote: -----> Extracting ImageMagick /app/tmp/cache/imagemagick-6.9.9-23.7z.tar.gz => /tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor
remote: -----> Writing policy file
remote: -----> Updating environment variables
remote: -----> ffmpeg app detected
remote: -----> Install ffmpeg
remote: DOWNLOAD_URL = https://www.johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz
remote: exporting PATH
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.5.0
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/.
remote: Retrying fetcher due to error (2/4): Bundler::HTTPError The checksum of /info/erubi does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (3/4): Bundler::HTTPError The checksum of /info/crass does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (4/4): Bundler::HTTPError The checksum of /info/sass-listen does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: The checksum of /info/et-orbi does not match the checksum provided by the
remote: server! Something is wrong (local checksum is
remote: "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"").
remote: Bundler Output: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/.
remote: Retrying fetcher due to error (2/4): Bundler::HTTPError The checksum of /info/erubi does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (3/4): Bundler::HTTPError The checksum of /info/crass does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (4/4): Bundler::HTTPError The checksum of /info/sass-listen does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: The checksum of /info/et-orbi does not match the checksum provided by the
remote: server! Something is wrong (local checksum is
remote: "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"").
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fply.
remote:
To https://git.heroku.com/fply.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fply.git'

Stack overflow push rejected with no reason

I'm trying to push to heroku and it get's to the verifying deploy... step but then rejects the push for no reason:
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
remote: =====> Detected Framework: Ruby
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.1.2
remote: -----> Installing dependencies using 1.7.12
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching source index from https://rubygems.org/
remote: Verifying deploy..................................................
remote:
remote: ! Push rejected to <APP_NAME_OMITTED>.
remote:
! [remote rejected] test_botched_deploy -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/APP-NAME-OMITTED.git'
I'm not sure what to google for this. Is there a way to enable a verbose mode for heroku deploys?
Presuming that everything works locally before you push, a good place to start is to make sure you have pushed a current version of your Gemfile and Gemfile.lock.

Could not find thread_safe-0.3.5 in any of the sources

I get this error while running cap production deploy on a Ubuntu 14.04 server.
It seems like a similar issue to here, but I've tried all the answers here but can't get it working Could not find thread_safe-0.3.0 in any of the sources.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as root#*serveripaddress*: bundle exit status: 7
bundle stdout: Could not find thread_safe-0.3.5 in any of the sources
bundle stderr: Nothing written
SSHKit::Command::Failed: bundle exit status: 7
bundle stdout: Could not find thread_safe-0.3.5 in any of the sources
bundle stderr: Nothing written
Tasks: TOP => deploy:updated => bundler:install
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as root#*serveripaddress*: bundle exit status: 7
bundle stdout: Could not find thread_safe-0.3.5 in any of the sources
bundle stderr: Nothing written
Update: I've tried deploying to Heroku and get a similar error. If anyone has any advice it would be great.
$ git push heroku master
Counting objects: 10017, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7613/7613), done.
Writing objects: 100% (10017/10017), 22.27 MiB | 87.00 KiB/s, done.
Total 10017 (delta 2426), reused 7631 (delta 1548)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby, Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using 1.7.12
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find thread_safe-0.3.5 in any of the sources
remote: Bundler Output: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find thread_safe-0.3.5 in any of the sources
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to mysterious-badlands-3241.
remote:

Resources