heroku-buildpack-ruby icon indicating copy to clipboard operation
heroku-buildpack-ruby copied to clipboard

Possible Bundler 2.5.6 Issues

Open jarednorman opened this issue 1 year ago • 5 comments

Deploys for our app were fine one Feb 27th, but have been failing since Feb 28th. We cannot deploy the git ref that successfully deployed on Feb 27th. My suspicion was that this might be caused by a change in the ruby buildpack, since it doesn't seem to relate to a change in the codebase.

The step that is failing is the Detecting rake tasks. It fails like this:

-----> Detecting rake tasks

 !
 !     Could not detect rake tasks
 !     ensure you can run `$ bundle exec rake -P` against your app
 !     and using the production group of your Gemfile.
 !     fatal: not a git repository (or any parent up to mount point /)
 !     Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
 !     /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/definition.rb:480:in `materialize': Could not find mini_portile2-2.8.5 in any of the sources (Bundler::GemNotFound)
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/definition.rb:185:in `specs'
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/definition.rb:233:in `specs_for'
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/runtime.rb:18:in `setup'
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler.rb:150:in `setup'
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/setup.rb:20:in `block in <top (required)>'
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/ui/shell.rb:136:in `with_level'
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/ui/shell.rb:88:in `silence'
 !     from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/setup.rb:20:in `<top (required)>'
 !     from <internal:/tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
 !     from <internal:/tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
 !     from /tmp/build_af31c9ce/config/boot.rb:3:in `<top (required)>'
 !     from /tmp/build_af31c9ce/bin/rake:2:in `require_relative'
 !     from /tmp/build_af31c9ce/bin/rake:2:in `<main>'
 !
/tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:100:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError)
ensure you can run `$ bundle exec rake -P` against your app
and using the production group of your Gemfile.
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
/tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/definition.rb:480:in `materialize': Could not find mini_portile2-2.8.5 in any of the sources (Bundler::GemNotFound)
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/definition.rb:185:in `specs'
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/definition.rb:233:in `specs_for'
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/runtime.rb:18:in `setup'
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler.rb:150:in `setup'
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/setup.rb:20:in `block in <top (required)>'
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/ui/shell.rb:136:in `with_level'
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/ui/shell.rb:88:in `silence'
	from /tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/bundler/setup.rb:20:in `<top (required)>'
	from <internal:/tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/tmp/build_af31c9ce/vendor/ruby-3.0.6/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /tmp/build_af31c9ce/config/boot.rb:3:in `<top (required)>'
	from /tmp/build_af31c9ce/bin/rake:2:in `require_relative'
	from /tmp/build_af31c9ce/bin/rake:2:in `<main>'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:981:in `rake'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:69:in `block in run_assets_precompile_rake_task'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:175:in `log'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:63:in `run_assets_precompile_rake_task'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:103:in `block in compile'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:1002:in `allow_git'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:96:in `compile'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails2.rb:55:in `compile'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails3.rb:37:in `compile'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:30:in `compile'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails6.rb:17:in `compile'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/bin/support/ruby_compile:19:in `block in <main>'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:175:in `log'
	from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/bin/support/ruby_compile:18:in `<main>'
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

I can install the gems locally with exactly the same command that is listed in the logs (BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4) and run bundle exec rake -P as the logs indicate and cannot reproduce the issue locally.

My assumption is that this issue is related to this change, because when I employ the workaround listed there, I am able to deploy and the build started failing alongside that change.

I'm not exactly sure how to proceed, as I don't really know how to debug this.

Ruby version: 3.0.6 Rails version: 6.1.7.6 Stack: Heroku-20

jarednorman avatar Mar 05 '24 01:03 jarednorman

This may help: https://github.com/heroku/heroku-buildpack-ruby/issues/1430#issuecomment-1972974741

dentarg avatar Mar 05 '24 05:03 dentarg

I did at some point try that and it didn't help, but I can double check.

jarednorman avatar Mar 05 '24 16:03 jarednorman

I have confirmed that clearing the cache does not resolve this issue.

jarednorman avatar Mar 06 '24 01:03 jarednorman

I think it is best to open up a support ticket with Heroku to get the attention from @schneems on this. He will probably ask you questions and can probably take a look at your specific app then too.

(To be clear, I'm not affiliated with Heroku, just a user/customer myself)

dentarg avatar Mar 06 '24 20:03 dentarg

Thanks, I'll do that.

jarednorman avatar Mar 08 '24 00:03 jarednorman