简体   繁体   中英

bundler fails when execute "git push"

I'm writing an app with Ruby on Rails.

Two days ago, I made tiny change in my code and executed "git push". But bundler failed however Gemfile never changed.

I thought it might be temporary problem at that time, but this problem is still there.

Is it caused by my code or Heroku platform?

There is the error messages.

remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/ruby
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.2.33
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-3.1.1
remote:
remote: ###### WARNING:
remote:
remote:        Removing `Gemfile.lock` because it was generated on Windows.
remote:        Bundler will do a full resolve so native gems are handled properly.
remote:        This may result in unexpected gem versions being used in your app.
remote:        In rare occasions Bundler may not be able to resolve your dependencies at all.
remote:
remote:        https://devcenter.heroku.com/articles/bundler-windows-gemfile
remote:
remote: -----> Installing dependencies using bundler 2.2.33
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin bundle install -j4
remote:        [212, #<Thread:0x00007f7ea861fc78 run>, #<NameError: uninitialized constant Gem::Source
remote:
remote:              (defined?(@source) && @source) || Gem::Source::Installed.new
remote:                                                   ^^^^^^^^
remote:        Did you mean?  Gem::SourceList>, ["/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/rubygems_ext.rb:18:in `source'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/rubygems_ext.rb:50:in `extension_dir'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/basic_specification.rb:339:in `have_file?'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/basic_specification.rb:86:in `contains_requirable_file?'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1038:in `block (2 levels) in find_in_unresolved_tree'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2555:in `block (2 levels) in traverse'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2550:in `each'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2550:in `block in traverse'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2548:in `each'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2548:in `traverse'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1034:in `block in find_in_unresolved_tree'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1033:in `each'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1033:in `find_in_unresolved_tree'", "<internal:/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:114:in `require'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/rubygems_ext.rb:18:in `source'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/rubygems_ext.rb:50:in `extension_dir'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/basic_specification.rb:339:in `have_file?'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/basic_specification.rb:86:in `contains_requirable_file?'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1038:in `block (2 levels) in find_in_unresolved_tree'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2555:in `block (2 levels) in traverse'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2550:in `each'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2550:in `block in traverse'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2548:in `each'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:2548:in `traverse'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1034:in `block in find_in_unresolved_tree'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1033:in `each'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/specification.rb:1033:in `find_in_unresolved_tree'", "<internal:/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:114:in `require'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb:1:in `<top (required)>'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/vendored_persistent.rb:11:in `require_relative'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/vendored_persistent.rb:11:in `<top (required)>'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/fetcher.rb:3:in `require_relative'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/fetcher.rb:3:in `<top (required)>'", "<internal:/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'", "<internal:/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/cli/install.rb:50:in `run'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/cli.rb:255:in `block in install'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/settings.rb:131:in `temporary'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/cli.rb:254:in `install'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.7/libexec/bundle:48:in `block in <top (required)>'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'", "/tmp/build_e117e25f/vendor/ruby-3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.7/libexec/bundle:36:in `<top (required)>'", "/tmp/build_e117e25f/bin/bundle:113:in `load'", "/tmp/build_e117e25f/bin/bundle:113:in `<main>'"]]

If your Gemfile.lock contains these lines somewhere:

   x86-mingw32
   mysql2 (x86-mingw32)

Remove them and anything else that references "mingw32" as there may be conflicts with the architecture Heroku works with, as the goal is not to mess with the Windows OS that this library brings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM