Skip to content

Possible Bundler 2.5.6 Issues #1432

@jarednorman

Description

@jarednorman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions