首页 > 解决方案 > Heroku NameError:未初始化的常量 Bundler,无法检测到 rake 任务

问题描述

我真的不知道发生了什么事。我不断收到错误...

/tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:106: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.
rake aborted!
NameError: uninitialized constant Bundler

...每次我尝试部署应用程序时。我确实重置了我的电脑,重新安装了 ruby​​、rails 和几乎所有东西。

该错误还指出

# application.rb
require_relative 'boot'

require 'rails/all'

line 7: Bundler.require(*Rails.groups)

module Elaka
  class Application < Rails::Application
    config.load_defaults 6.0
    config.exceptions_app = self.routes
  end
end

下面找到整个日志文件

-----> Building on the Heroku-20 stack
 !     Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
            Detected buildpacks: Ruby,Node.js
            See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Installing bundler 2.2.11
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.7.1
-----> Installing dependencies using bundler 2.2.11
       Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
       Fetching gem metadata from https://rubygems.org/..........
       Fetching https://github.com/activerecord-hackery/ransack.git
       Fetching rake 13.0.3
       Installing rake 13.0.3
       Fetching concurrent-ruby 1.1.8
       Fetching minitest 5.14.4
       Fetching zeitwerk 2.4.2
       Fetching thread_safe 0.3.6
       Installing minitest 5.14.4
       Installing zeitwerk 2.4.2
       Installing concurrent-ruby 1.1.8
       Installing thread_safe 0.3.6
       Fetching builder 3.2.4
       Installing builder 3.2.4
       Fetching erubi 1.10.0
       Installing erubi 1.10.0
       Fetching mini_portile2 2.5.0
       Installing mini_portile2 2.5.0
       Fetching racc 1.5.2
       Fetching crass 1.0.6
       Installing racc 1.5.2 with native extensions
       Installing crass 1.0.6
       Fetching rack 2.2.3
       Fetching nio4r 2.5.5
       Installing nio4r 2.5.5 with native extensions
       Installing rack 2.2.3
       Fetching websocket-extensions 0.1.5
       Installing websocket-extensions 0.1.5
       Fetching mimemagic 0.3.5
       Installing mimemagic 0.3.5
       Fetching mini_mime 1.0.2
       Installing mini_mime 1.0.2
       Fetching acts_as_votable 0.13.1
       Installing acts_as_votable 0.13.1
       Fetching bcrypt 3.1.16
       Installing bcrypt 3.1.16 with native extensions
       Using bundler 2.2.11
       Fetching cancancan 3.2.1
       Installing cancancan 3.2.1
       Fetching orm_adapter 0.5.0
       Installing orm_adapter 0.5.0
       Fetching method_source 1.0.0
       Installing method_source 1.0.0
       Fetching thor 1.1.0
       Installing thor 1.1.0
       Fetching ffi 1.14.2
       Installing ffi 1.14.2 with native extensions
       Fetching temple 0.8.2
       Installing temple 0.8.2
       Fetching tilt 2.0.10
       Installing tilt 2.0.10
       Fetching json 2.5.1
       Installing json 2.5.1 with native extensions
       Fetching kaminari-core 1.2.1
       Installing kaminari-core 1.2.1
       Fetching nested_form 0.3.2
       Installing nested_form 0.3.2
       Fetching paper_trail-association_tracking 2.1.1
       Installing paper_trail-association_tracking 2.1.1
       Fetching pg 1.2.3
       Installing pg 1.2.3 with native extensions
       Fetching remotipart 1.4.4
       Installing remotipart 1.4.4
       Fetching semantic_range 2.3.1
       Installing semantic_range 2.3.1
       Fetching tzinfo 1.2.9
       Installing tzinfo 1.2.9
       Fetching i18n 1.8.9
       Installing i18n 1.8.9
       Fetching websocket-driver 0.7.3
       Installing websocket-driver 0.7.3 with native extensions
       Fetching rack-test 1.1.0
       Installing rack-test 1.1.0
       Fetching warden 1.2.9
       Installing warden 1.2.9
       Fetching request_store 1.5.0
       Installing request_store 1.5.0
       Fetching rack-proxy 0.6.5
       Installing rack-proxy 0.6.5
       Fetching sprockets 4.0.2
       Installing sprockets 4.0.2
       Fetching marcel 0.3.3
       Installing marcel 0.3.3
       Fetching mail 2.7.1
       Installing mail 2.7.1
       Fetching puma 4.3.7
       Installing puma 4.3.7 with native extensions
       Fetching haml 5.2.1
       Installing haml 5.2.1
       Fetching nokogiri 1.11.1 (x86_64-linux)
       Installing nokogiri 1.11.1 (x86_64-linux)
       Fetching activesupport 6.0.3.5
       Installing activesupport 6.0.3.5
       Fetching sassc 2.4.0
       Installing sassc 2.4.0 with native extensions
       Fetching globalid 0.4.2
       Installing globalid 0.4.2
       Fetching activemodel 6.0.3.5
       Installing activemodel 6.0.3.5
       Fetching jbuilder 2.11.2
       Installing jbuilder 2.11.2
       Fetching rails-dom-testing 2.0.3
       Installing rails-dom-testing 2.0.3
       Fetching loofah 2.9.0
       Installing loofah 2.9.0
       Fetching rack-pjax 1.1.0
       Installing rack-pjax 1.1.0
       Fetching activejob 6.0.3.5
       Installing activejob 6.0.3.5
       Fetching activerecord 6.0.3.5
       Installing activerecord 6.0.3.5
       Fetching activemodel-serializers-xml 1.0.2
       Installing activemodel-serializers-xml 1.0.2
       Fetching rails-html-sanitizer 1.3.0
       Installing rails-html-sanitizer 1.3.0
       Fetching friendly_id 5.4.2
       Installing friendly_id 5.4.2
       Fetching kaminari-activerecord 1.2.1
       Installing kaminari-activerecord 1.2.1
       Fetching paper_trail 11.1.0
       Installing paper_trail 11.1.0
       Using ransack 2.4.2 from https://github.com/activerecord-hackery/ransack.git (at master@15b2dc6)
       Fetching actionview 6.0.3.5
       Installing actionview 6.0.3.5
       Fetching actionpack 6.0.3.5
       Installing actionpack 6.0.3.5
       Fetching kaminari-actionview 1.2.1
       Installing kaminari-actionview 1.2.1
       Fetching actioncable 6.0.3.5
       Installing actioncable 6.0.3.5
       Fetching activestorage 6.0.3.5
       Installing activestorage 6.0.3.5
       Fetching actionmailer 6.0.3.5
       Installing actionmailer 6.0.3.5
       Fetching railties 6.0.3.5
       Installing railties 6.0.3.5
       Fetching sprockets-rails 3.2.2
       Installing sprockets-rails 3.2.2
       Fetching kaminari 1.2.1
       Installing kaminari 1.2.1
       Fetching actionmailbox 6.0.3.5
       Installing actionmailbox 6.0.3.5
       Fetching actiontext 6.0.3.5
       Installing actiontext 6.0.3.5
       Fetching responders 3.0.1
       Installing responders 3.0.1
       Fetching jquery-rails 4.4.0
       Installing jquery-rails 4.4.0
       Fetching jquery-ui-rails 6.0.1
       Installing jquery-ui-rails 6.0.1
       Fetching webpacker 5.2.1
       Installing webpacker 5.2.1
       Fetching rails 6.0.3.5
       Installing rails 6.0.3.5
       Fetching devise 4.7.3
       Installing devise 4.7.3
       Fetching sassc-rails 2.1.2
       Installing sassc-rails 2.1.2
       Fetching sass-rails 6.0.0
       Fetching rails_admin 2.1.0
       Installing sass-rails 6.0.0
       Fetching recaptcha 5.7.0
       Installing recaptcha 5.7.0
       Installing rails_admin 2.1.0
       Bundle complete! 25 Gemfile dependencies, 82 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Bundle completed (254.17s)
       Cleaning up the bundler cache.
-----> Installing node-v12.16.2-linux-x64
-----> Installing yarn-v1.22.4
-----> 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.
 !     rake aborted!
 !     NameError: uninitialized constant Bundler
 !     /tmp/build_bfb029d6/config/application.rb:7:in `<top (required)>'
 !     /tmp/build_bfb029d6/Rakefile:4:in `require_relative'
 !     /tmp/build_bfb029d6/Rakefile:4:in `<top (required)>'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in `load'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in `load_rakefile'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:703:in `raw_load_rakefile'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:104:in `block in load_rakefile'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:103:in `load_rakefile'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:82:in `block in run'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
 !     /tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:80:in `run'
 !     /tmp/build_bfb029d6/bin/rake:4:in `<main>'
 !
/tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:106: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.
rake aborted!
NameError: uninitialized constant Bundler
/tmp/build_bfb029d6/config/application.rb:7:in `<top (required)>'
/tmp/build_bfb029d6/Rakefile:4:in `require_relative'
/tmp/build_bfb029d6/Rakefile:4:in `<top (required)>'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in `load'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_module.rb:29:in `load_rakefile'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:703:in `raw_load_rakefile'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:104:in `block in load_rakefile'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:103:in `load_rakefile'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:82:in `block in run'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/tmp/build_bfb029d6/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:80:in `run'
/tmp/build_bfb029d6/bin/rake:4:in `<main>'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:1030:in `rake'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:78:in `block (2 levels) in run_assets_precompile_rake_task'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:190:in `log'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:72:in `block in run_assets_precompile_rake_task'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/vendor/ruby/heroku-20/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:16:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:50:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:46:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:71:in `run_assets_precompile_rake_task'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:112:in `block (2 levels) in compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:1051:in `allow_git'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:105:in `block in compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/vendor/ruby/heroku-20/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:16:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:50:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:46:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/ruby.rb:91:in `compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails2.rb:62:in `block in compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/vendor/ruby/heroku-20/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:16:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:50:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:46:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails2.rb:60:in `compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails3.rb:42:in `block in compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/vendor/ruby/heroku-20/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:16:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:50:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:46:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails3.rb:41:in `compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:35:in `block in compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/vendor/ruby/heroku-20/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:16:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:50:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:46:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails4.rb:34:in `compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails6.rb:20:in `block in compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/vendor/ruby/heroku-20/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:16:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:50:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:46:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/rails6.rb:18:in `compile'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/bin/support/ruby_compile:20:in `block (2 levels) in <main>'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/base.rb:190:in `log'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/bin/support/ruby_compile:19:in `block in <main>'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:35:in `block in trace'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:17:in `block in instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/vendor/ruby/heroku-20/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:16:in `instrument'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/instrument.rb:35:in `trace'
    from /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/bin/support/ruby_compile:15:in `<main>'
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

捆绑器停产了吗?

标签: rubyherokubundlerruby-on-rails-6

解决方案


尝试执行此命令:

#remove project-specific settings
rm -rf .bundle/

# remove project-specific cached gems and repos
rm -rf vendor/cache/

# remove the saved resolve of the Gemfile
rm -rf Gemfile.lock

然后使用 bundle install 重新捆绑


推荐阅读