Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered #3284

Closed
u16suzu opened this issue Dec 15, 2019 · 37 comments 路 Fixed by #3458
Labels

Comments

@u16suzu
Copy link

u16suzu commented Dec 15, 2019

Thanks for update bundler to 2.1.0 馃帀
But today when I creating a new rails app, bundler had an error below.

My environment

MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
macOS HighSierra version 10.13.3

ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin17]
RubyGems version 3.0.3
Bundler version 2.1.0

Command I ran

rails new tsukuroyo3 -d mysql --skip_javascript

Short log

bundler: failed to load command: spring (/Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/bin/spring)
ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:9:in `status_code'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:20:in `<class:GemfileError>'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:20:in `<module:Bundler>'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:3:in `<top (required)>'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler.rb:10:in `require'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler.rb:10:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client/run.rb:3:in `require'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client/run.rb:3:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client.rb:5:in `require'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client.rb:5:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/bin/spring:48:in `require'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/bin/spring:48:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/bin/spring:23:in `load'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/bin/spring:23:in `<top (required)>'
Full log
suzuki_y@MBP:~/projects$ rails new tsukuroyo3   -d mysql --skip_javascript
      create
      create  README.md
      create  Rakefile
      create  .ruby-version
      create  config.ru
      create  .gitignore
      create  Gemfile
         run  git init from "."
Initialized empty Git repository in /Users/suzuki_y/projects/tsukuroyo3/.git/
      create  app
      create  app/assets/config/manifest.js
      create  app/assets/stylesheets/application.css
      create  app/channels/application_cable/channel.rb
      create  app/channels/application_cable/connection.rb
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/javascript/channels/consumer.js
      create  app/javascript/channels/index.js
      create  app/javascript/packs/application.js
      create  app/jobs/application_job.rb
      create  app/mailers/application_mailer.rb
      create  app/models/application_record.rb
      create  app/views/layouts/application.html.erb
      create  app/views/layouts/mailer.html.erb
      create  app/views/layouts/mailer.text.erb
      create  app/assets/images/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  bin/yarn
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/cable.yml
      create  config/puma.rb
      create  config/spring.rb
      create  config/storage.yml
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/application_controller_renderer.rb
      create  config/initializers/assets.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/content_security_policy.rb
      create  config/initializers/cookies_serializer.rb
      create  config/initializers/cors.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_framework_defaults_6_0.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/master.key
      append  .gitignore
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  lib
      create  lib/tasks
      create  lib/tasks/.keep
      create  lib/assets
      create  lib/assets/.keep
      create  log
      create  log/.keep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/apple-touch-icon-precomposed.png
      create  public/apple-touch-icon.png
      create  public/favicon.ico
      create  public/robots.txt
      create  tmp
      create  tmp/.keep
      create  tmp/pids
      create  tmp/pids/.keep
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor
      create  vendor/.keep
      create  test/fixtures
      create  test/fixtures/.keep
      create  test/fixtures/files
      create  test/fixtures/files/.keep
      create  test/controllers
      create  test/controllers/.keep
      create  test/mailers
      create  test/mailers/.keep
      create  test/models
      create  test/models/.keep
      create  test/helpers
      create  test/helpers/.keep
      create  test/integration
      create  test/integration/.keep
      create  test/channels/application_cable/connection_test.rb
      create  test/test_helper.rb
      create  test/system
      create  test/system/.keep
      create  test/application_system_test_case.rb
      create  storage
      create  storage/.keep
      create  tmp/storage
      create  tmp/storage/.keep
      remove  app/javascript
      remove  config/initializers/cors.rb
      remove  config/initializers/new_framework_defaults_6_0.rb
      remove  bin/yarn
         run  bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 13.0.1
Installing rake 13.0.1
Fetching concurrent-ruby 1.1.5
Installing concurrent-ruby 1.1.5
Fetching i18n 1.7.0
Installing i18n 1.7.0
Fetching minitest 5.13.0
Installing minitest 5.13.0
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching zeitwerk 2.2.2
Installing zeitwerk 2.2.2
Fetching activesupport 6.0.2
Installing activesupport 6.0.2
Fetching builder 3.2.4
Installing builder 3.2.4
Fetching erubi 1.9.0
Installing erubi 1.9.0
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.7
Installing nokogiri 1.10.7 with native extensions
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.5
Installing crass 1.0.5
Fetching loofah 2.4.0
Installing loofah 2.4.0
Fetching rails-html-sanitizer 1.3.0
Installing rails-html-sanitizer 1.3.0
Fetching actionview 6.0.2
Installing actionview 6.0.2
Fetching rack 2.0.7
Installing rack 2.0.7
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching actionpack 6.0.2
Installing actionpack 6.0.2
Fetching nio4r 2.5.2
Installing nio4r 2.5.2 with native extensions
Fetching websocket-extensions 0.1.4
Installing websocket-extensions 0.1.4
Fetching websocket-driver 0.7.1
Installing websocket-driver 0.7.1 with native extensions
Fetching actioncable 6.0.2
Installing actioncable 6.0.2
Fetching globalid 0.4.2
Installing globalid 0.4.2
Fetching activejob 6.0.2
Installing activejob 6.0.2
Fetching activemodel 6.0.2
Installing activemodel 6.0.2
Fetching activerecord 6.0.2
Installing activerecord 6.0.2
Fetching mimemagic 0.3.3
Installing mimemagic 0.3.3
Fetching marcel 0.3.3
Installing marcel 0.3.3
Fetching activestorage 6.0.2
Installing activestorage 6.0.2
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching actionmailbox 6.0.2
Installing actionmailbox 6.0.2
Fetching actionmailer 6.0.2
Installing actionmailer 6.0.2
Fetching actiontext 6.0.2
Installing actiontext 6.0.2
Fetching public_suffix 4.0.1
Installing public_suffix 4.0.1
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching bindex 0.8.1
Installing bindex 0.8.1 with native extensions
Fetching msgpack 1.3.1
Installing msgpack 1.3.1 with native extensions
Fetching bootsnap 1.4.5
Installing bootsnap 1.4.5 with native extensions
Using bundler 2.1.0
Fetching byebug 11.0.1
Installing byebug 11.0.1 with native extensions
Fetching regexp_parser 1.6.0
Installing regexp_parser 1.6.0
Fetching xpath 3.2.0
Installing xpath 3.2.0
Fetching capybara 3.29.0
Installing capybara 3.29.0
Fetching childprocess 3.0.0
Installing childprocess 3.0.0
Fetching ffi 1.11.3
Installing ffi 1.11.3 with native extensions
Fetching jbuilder 2.9.1
Installing jbuilder 2.9.1
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching rb-inotify 0.10.0
Installing rb-inotify 0.10.0
Fetching ruby_dep 1.5.0
Installing ruby_dep 1.5.0
Fetching listen 3.1.5
Installing listen 3.1.5
Fetching method_source 0.9.2
Installing method_source 0.9.2
Fetching mysql2 0.5.3
Installing mysql2 0.5.3 with native extensions
Fetching puma 4.3.1
Installing puma 4.3.1 with native extensions
Fetching thor 1.0.0
Installing thor 1.0.0
Fetching railties 6.0.2
Installing railties 6.0.2
Fetching sprockets 4.0.0
Installing sprockets 4.0.0
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Fetching rails 6.0.2
Installing rails 6.0.2
Fetching rubyzip 2.0.0
Installing rubyzip 2.0.0
Fetching sassc 2.2.1
Installing sassc 2.2.1 with native extensions
Fetching tilt 2.0.10
Installing tilt 2.0.10
Fetching sassc-rails 2.1.2
Installing sassc-rails 2.1.2
Fetching sass-rails 6.0.0
Installing sass-rails 6.0.0
Fetching selenium-webdriver 3.142.6
Installing selenium-webdriver 3.142.6
Fetching spring 2.1.0
Installing spring 2.1.0
Fetching spring-watcher-listen 2.0.1
Installing spring-watcher-listen 2.0.1
Fetching web-console 4.0.1
Installing web-console 4.0.1
Fetching webdrivers 4.1.3
Installing webdrivers 4.1.3
Bundle complete! 15 Gemfile dependencies, 71 gems now installed.
Bundled gems are installed into `./vendor/bundle`
         run  bundle binstubs bundler
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
         run  bundle exec spring binstub --all
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1186: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.0/lib/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: previous definition of S_IF_DOOR was here
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1444: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.0/lib/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: previous definition of DIRECTORY_TERM was here
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1499: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.0/lib/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: previous definition of OPT_TABLE was here
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1553: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.0/lib/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: previous definition of LOW_METHODS was here
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1560: warning: already initialized constant Bundler::FileUtils::METHODS
/Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.0/lib/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: previous definition of METHODS was here
bundler: failed to load command: spring (/Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/bin/spring)
ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:9:in `status_code'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:20:in `<class:GemfileError>'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:20:in `<module:Bundler>'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler/errors.rb:3:in `<top (required)>'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler.rb:10:in `require'
  /Users/suzuki_y/.rbenv/versions/2.6.3/lib/ruby/2.6.0/bundler.rb:10:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client/run.rb:3:in `require'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client/run.rb:3:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client.rb:5:in `require'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/lib/spring/client.rb:5:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/bin/spring:48:in `require'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/gems/spring-2.1.0/bin/spring:48:in `<top (required)>'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/bin/spring:23:in `load'
  /Users/suzuki_y/projects/tsukuroyo3/vendor/bundle/ruby/2.6.0/bin/spring:23:in `<top (required)>'
@u16suzu
Copy link
Author

u16suzu commented Dec 15, 2019

With previous version, Bundler 2.0.2, This error is not occurred.

suzuki_y@MBP:~/projects$ ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin17]
suzuki_y@MBP:~/projects$ bundle -v  
Bundler version 2.0.2
suzuki_y@MBP:~/projects$ gem -v 
3.0.3
log
suzuki_y@MBP:~/projects$ rails new tsukuroyo4   -d mysql --skip_javascript 
      create
      create  README.md
      create  Rakefile
      create  .ruby-version
      create  config.ru
      create  .gitignore
      create  Gemfile
         run  git init from "."
Initialized empty Git repository in /Users/suzuki_y/projects/tsukuroyo4/.git/
      create  app
      create  app/assets/config/manifest.js
      create  app/assets/stylesheets/application.css
      create  app/channels/application_cable/channel.rb
      create  app/channels/application_cable/connection.rb
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/javascript/channels/consumer.js
      create  app/javascript/channels/index.js
      create  app/javascript/packs/application.js
      create  app/jobs/application_job.rb
      create  app/mailers/application_mailer.rb
      create  app/models/application_record.rb
      create  app/views/layouts/application.html.erb
      create  app/views/layouts/mailer.html.erb
      create  app/views/layouts/mailer.text.erb
      create  app/assets/images/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  bin/yarn
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/cable.yml
      create  config/puma.rb
      create  config/spring.rb
      create  config/storage.yml
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/application_controller_renderer.rb
      create  config/initializers/assets.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/content_security_policy.rb
      create  config/initializers/cookies_serializer.rb
      create  config/initializers/cors.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_framework_defaults_6_0.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/master.key
      append  .gitignore
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  lib
      create  lib/tasks
      create  lib/tasks/.keep
      create  lib/assets
      create  lib/assets/.keep
      create  log
      create  log/.keep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/apple-touch-icon-precomposed.png
      create  public/apple-touch-icon.png
      create  public/favicon.ico
      create  public/robots.txt
      create  tmp
      create  tmp/.keep
      create  tmp/pids
      create  tmp/pids/.keep
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor
      create  vendor/.keep
      create  test/fixtures
      create  test/fixtures/.keep
      create  test/fixtures/files
      create  test/fixtures/files/.keep
      create  test/controllers
      create  test/controllers/.keep
      create  test/mailers
      create  test/mailers/.keep
      create  test/models
      create  test/models/.keep
      create  test/helpers
      create  test/helpers/.keep
      create  test/integration
      create  test/integration/.keep
      create  test/channels/application_cable/connection_test.rb
      create  test/test_helper.rb
      create  test/system
      create  test/system/.keep
      create  test/application_system_test_case.rb
      create  storage
      create  storage/.keep
      create  tmp/storage
      create  tmp/storage/.keep
      remove  app/javascript
      remove  config/initializers/cors.rb
      remove  config/initializers/new_framework_defaults_6_0.rb
      remove  bin/yarn
         run  bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 13.0.1
Installing rake 13.0.1
Fetching concurrent-ruby 1.1.5
Installing concurrent-ruby 1.1.5
Fetching i18n 1.7.0
Installing i18n 1.7.0
Fetching minitest 5.13.0
Installing minitest 5.13.0
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching zeitwerk 2.2.2
Installing zeitwerk 2.2.2
Fetching activesupport 6.0.2
Installing activesupport 6.0.2
Fetching builder 3.2.4
Installing builder 3.2.4
Fetching erubi 1.9.0
Installing erubi 1.9.0
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.7
Installing nokogiri 1.10.7 with native extensions
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.5
Installing crass 1.0.5
Fetching loofah 2.4.0
Installing loofah 2.4.0
Fetching rails-html-sanitizer 1.3.0
Installing rails-html-sanitizer 1.3.0
Fetching actionview 6.0.2
Installing actionview 6.0.2
Fetching rack 2.0.7
Installing rack 2.0.7
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching actionpack 6.0.2
Installing actionpack 6.0.2
Fetching nio4r 2.5.2
Installing nio4r 2.5.2 with native extensions
Fetching websocket-extensions 0.1.4
Installing websocket-extensions 0.1.4
Fetching websocket-driver 0.7.1
Installing websocket-driver 0.7.1 with native extensions
Fetching actioncable 6.0.2
Installing actioncable 6.0.2
Fetching globalid 0.4.2
Installing globalid 0.4.2
Fetching activejob 6.0.2
Installing activejob 6.0.2
Fetching activemodel 6.0.2
Installing activemodel 6.0.2
Fetching activerecord 6.0.2
Installing activerecord 6.0.2
Fetching mimemagic 0.3.3
Installing mimemagic 0.3.3
Fetching marcel 0.3.3
Installing marcel 0.3.3
Fetching activestorage 6.0.2
Installing activestorage 6.0.2
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching actionmailbox 6.0.2
Installing actionmailbox 6.0.2
Fetching actionmailer 6.0.2
Installing actionmailer 6.0.2
Fetching actiontext 6.0.2
Installing actiontext 6.0.2
Fetching public_suffix 4.0.1
Installing public_suffix 4.0.1
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching bindex 0.8.1
Installing bindex 0.8.1 with native extensions
Fetching msgpack 1.3.1
Installing msgpack 1.3.1 with native extensions
Fetching bootsnap 1.4.5
Installing bootsnap 1.4.5 with native extensions
Using bundler 2.0.2
Fetching byebug 11.0.1
Installing byebug 11.0.1 with native extensions
Fetching regexp_parser 1.6.0
Installing regexp_parser 1.6.0
Fetching xpath 3.2.0
Installing xpath 3.2.0
Fetching capybara 3.29.0
Installing capybara 3.29.0
Fetching childprocess 3.0.0
Installing childprocess 3.0.0
Fetching ffi 1.11.3
Installing ffi 1.11.3 with native extensions
Fetching jbuilder 2.9.1
Installing jbuilder 2.9.1
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching rb-inotify 0.10.0
Installing rb-inotify 0.10.0
Fetching ruby_dep 1.5.0
Installing ruby_dep 1.5.0
Fetching listen 3.1.5
Installing listen 3.1.5
Fetching method_source 0.9.2
Installing method_source 0.9.2
Fetching mysql2 0.5.3
Installing mysql2 0.5.3 with native extensions
Fetching puma 4.3.1
Installing puma 4.3.1 with native extensions
Fetching thor 1.0.0
Installing thor 1.0.0
Fetching railties 6.0.2
Installing railties 6.0.2
Fetching sprockets 4.0.0
Installing sprockets 4.0.0
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Fetching rails 6.0.2
Installing rails 6.0.2
Fetching rubyzip 2.0.0
Installing rubyzip 2.0.0
Fetching sassc 2.2.1
Installing sassc 2.2.1 with native extensions
Fetching tilt 2.0.10
Installing tilt 2.0.10
Fetching sassc-rails 2.1.2
Installing sassc-rails 2.1.2
Fetching sass-rails 6.0.0
Installing sass-rails 6.0.0
Fetching selenium-webdriver 3.142.6
Installing selenium-webdriver 3.142.6
Fetching spring 2.1.0
Installing spring 2.1.0
Fetching spring-watcher-listen 2.0.1
Installing spring-watcher-listen 2.0.1
Fetching web-console 4.0.1
Installing web-console 4.0.1
Fetching webdrivers 4.1.3
Installing webdrivers 4.1.3
Bundle complete! 15 Gemfile dependencies, 71 gems now installed.
Bundled gems are installed into `./vendor/bundle`
         run  bundle binstubs bundler
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
         run  bundle exec spring binstub --all
* bin/rake: Spring inserted
* bin/rails: Spring inserted

@deivid-rodriguez
Copy link
Member

Hi @u16suzu, thanks for quickly reporting this after the release.

Unfortunately I cannot reproduce this on my machine. Are you able to reproduce on a docker image or something that I can use? Also, can you run bundle env and gem env before running the rails generator and paste the results?

Thanks again!

@deivid-rodriguez
Copy link
Member

Forget about it, I can reproduce it by configuring bundler like bundle config set path vendor/bundle before running the command. I'm going to have a look now.

@deivid-rodriguez
Copy link
Member

I'm still investigating the cause, but gem update --system fixed the problem for me. Can you try?

@u16suzu
Copy link
Author

u16suzu commented Dec 16, 2019

Hi @deivid-rodriguez
Thanks comments!

Yes, exactly I am setting install path via --path vendor/bundle, and using fish shell.

suzuki_y@MBP:~/p/tsukuroyo3$ cat ~/.bundle/config
---
BUNDLE_PATH: "vendor/bundle"
BUNDLE_GEM__TEST: "minitest"
BUNDLE_GEM__MIT: "true"
BUNDLE_GEM__COC: "true"
BUNDLE_GIT__ALLOW_INSECURE: "true"
BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries"
BUNDLE_BUILD__EVENTMACHINE: "--with-cppflags=-I/usr/local/opt/openssl@1.1/include"

Also for me, gem update --system fixed the problem.
So, the problem is that rubygems's version and bundler's version.

I want to investigate the reason, but I should make my new web app for Interview test until next week.

@kpm
Copy link

kpm commented Dec 29, 2019

I'm getting a similar error with Rails 6 and ruby 2.7.0, bundler 2.1.2 in docker, is it the same bug/problem?. Please see Dockerfile attached. The command I ran was rails new alerts. Note that gem update --system has been added to the dockerfile.
Dockerfile.txt

bundler: failed to load command: spring (/usr/local/bundle/ruby/2.7.0/bin/spring)
ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
  /usr/local/lib/ruby/2.7.0/bundler/errors.rb:9:in `status_code'
  /usr/local/lib/ruby/2.7.0/bundler/errors.rb:20:in `<class:GemfileError>'
  /usr/local/lib/ruby/2.7.0/bundler/errors.rb:20:in `<module:Bundler>'
  /usr/local/lib/ruby/2.7.0/bundler/errors.rb:3:in `<top (required)>'
  /usr/local/lib/ruby/2.7.0/bundler.rb:7:in `require_relative'
  /usr/local/lib/ruby/2.7.0/bundler.rb:7:in `<top (required)>'
  /usr/local/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/client/run.rb:3:in `require'
  /usr/local/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/client/run.rb:3:in `<top (required)>'
  /usr/local/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/client.rb:5:in `require'
  /usr/local/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/client.rb:5:in `<top (required)>'
  /usr/local/bundle/ruby/2.7.0/gems/spring-2.1.0/bin/spring:48:in `require'
  /usr/local/bundle/ruby/2.7.0/gems/spring-2.1.0/bin/spring:48:in `<top (required)>'
  /usr/local/bundle/ruby/2.7.0/bin/spring:23:in `load'
  /usr/local/bundle/ruby/2.7.0/bin/spring:23:in `<top (required)>'
       rails  webpacker:install
Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
root@773608b2eb9f:/home/app#  gem --version
3.1.2
root@773608b2eb9f:/home/app# bundle --version
Bundler version 2.1.2

@ghost
Copy link

ghost commented Jan 15, 2020

Still the same issue with bundler 2.1.4, Ruby 2.7.0. gem update --system has been added to the Dockerfile.

EDIT: Saw issue https://github.com/rubygems/bundler/issues/7504 and followed the advice. This seems to 'fix' it.

@deivid-rodriguez
Copy link
Member

Thanks for the repros without against the latest version of rubygems. I'll try to have a look.

@hsbt hsbt transferred this issue from rubygems/bundler Mar 14, 2020
@casperisfine
Copy link

Interestingly I have a similar issue on our CI, but i use the versions described in the workaround:

bin/rake environment [redacted]
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4`.
Traceback (most recent call last):
	12: from bin/rake:8:in `<main>'
	11: from bin/rake:8:in `require_relative'
	10: from /app/config/boot.rb:44:in `<top (required)>'
	 9: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 8: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 7: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/setup.rb:6:in `<top (required)>'
	 6: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/setup.rb:6:in `require_relative'
	 5: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler.rb:7:in `<top (required)>'
	 4: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler.rb:7:in `require_relative'
	 3: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:3:in `<top (required)>'
	 2: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in `<module:Bundler>'
	 1: from /usr/lib/ruby/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in 

Additional versions:

irb(main):006:0> 
root@281aeec7b393:/# gem --version
3.1.2
root@281aeec7b393:/# bundle --version
Bundler version 2.1.4
root@281aeec7b393:/# ruby --version
ruby 2.7.1p37 (2020-03-15 revision 22afd8a1df) [x86_64-linux]

What I find interesting in the backtrace and output:

  • Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4) this suggest the bundler embedded with Ruby (2.1.2) is initially loaded.
  • from .../gems/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:20: This suggest the newer version of bundler installed through rubygems is loaded as well.

I haven't finished to test that yet, but based on the above constatation, I think I can work around the issue by not installing bundler 2.1.4, and using the 2.1.2 bundled with ruby.

@casperisfine
Copy link

Just to confirm, downgrading to 2.1.2 so that it uses the default bundler worked.

@qortex
Copy link

qortex commented Apr 3, 2020

I hit the same issue, but gem update --system doesn't solve it.

I generate a binstub for rake through: bundle binstubs rake. Then, running the binstub leads to:

rgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
/home/dev/xyz/product/backend/components/auth/Rakefile:3:in `require'
/home/dev/xyz/product/backend/components/auth/Rakefile:3:in `<top (required)>'

Line 3 in Rakefile is: require 'bundler/gem_tasks'. Removing this line fixes the issue. But I didn't lookup if I need this line yet.

Running gem update --system doesn't solve it.

@deivid-rodriguez
Copy link
Member

Hi! I think there might be two different issues here, but one of them should be fixed by #3458.

If that is your issue, the workaround in that case would be to upgrade rubygems if not using the latest version, or to downgrade and upgrade back if already using the latest version.

@qortex
Copy link

qortex commented Apr 3, 2020

Great, indeed, doing gem update --system 3.0.8 && gem update --system fixes the warnings (and other duplication definitions warnings). Also fixes the version mismatch discussed in the other thread that I didn't iron out yet. Thanks!

@deivid-rodriguez
Copy link
Member

Nice! So everything might be the same issue after all.

@marcamillion
Copy link

I am still getting this error, but I am doing something different.

I am running:

  • bundler version 2.1.4
  • rails version 6.0.2.2
  • ruby version 2.7.1

I initially got this error when running the annotate gem, which you can see in this issue - ctran/annotate_models#797

But I am also able to duplicate this issue in my project by simply trying to run:
bundler -v, bundler --v bundler -version or bundler --version.

See an example below.

$ bundler -version
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
/.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:105: warning: already initialized constant Bundler::FileUtils::VERSION
/.rvm/rubies/ruby-2.7.myappb/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:105: warning: previous definition of VERSION was here
/.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/.rvm/rubies/ruby-2.7.myappb/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: previous definition of S_IF_DOOR was here
/.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/.rvm/rubies/ruby-2.7.myappb/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: previous definition of DIRECTORY_TERM was here
/.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/.rvm/rubies/ruby-2.7.myappb/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: previous definition of OPT_TABLE was here
/.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/.rvm/rubies/ruby-2.7.myappb/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: previous definition of LOW_METHODS was here
/.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: already initialized constant Bundler::FileUtils::METHODS
/.rvm/rubies/ruby-2.7.myappb/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: previous definition of METHODS was here
Traceback (most recent call last):
	13: from /.rvm/gems/ruby-2.7.1@myapp/bin/ruby_executable_hooks:24:in `<main>'
	12: from /.rvm/gems/ruby-2.7.1@myapp/bin/ruby_executable_hooks:24:in `eval'
	11: from /.rvm/gems/ruby-2.7.1@myapp/bin/bundler:23:in `<main>'
	10: from /.rvm/gems/ruby-2.7.1@myapp/bin/bundler:23:in `load'
	 9: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/exe/bundler:4:in `<top (required)>'
	 8: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/exe/bundler:4:in `load'
	 7: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/exe/bundle:13:in `<top (required)>'
	 6: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/exe/bundle:13:in `require_relative'
	 5: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler.rb:7:in `<top (required)>'
	 4: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler.rb:7:in `require_relative'
	 3: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/errors.rb:3:in `<top (required)>'
	 2: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in `<module:Bundler>'
	 1: from /.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in `<class:GemfileError>'
/.rvm/gems/ruby-2.7.1@myapp/gems/bundler-2.1.4/lib/bundler/errors.rb:9:in `status_code': Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered (ArgumentError)

@deivid-rodriguez
Copy link
Member

So I should assume you already tried downgrading and upgrading back, right?

@marcamillion
Copy link

marcamillion commented Apr 11, 2020

Hrmm....I didn't actually try downgrading and upgrading back.

This is a fresh install.

But I guess I can try to downgrade and upgrade.

Edit 1

I downgraded to rubygems 3.1.1 and bundler worked fine there. Then I upgraded back to 3.1.2 and that works now.

Thanks for the tip @deivid-rodriguez!

@neonishu
Copy link

gem update

This worked absolutely fine.
Rails: 6
Ruby: 2.7
Spree: 4.1

@deivid-rodriguez
Copy link
Member

deivid-rodriguez commented May 31, 2020

Note that the fix for this issue was released with rubygems 3.1.3, so currently just upgrading rubygems should fix it (gem update --system).

@brilnius
Copy link

brilnius commented Jun 4, 2020

You mean gem update --system (instead of upgrade) I presume

@deivid-rodriguez
Copy link
Member

Yes, sorry!

@deivid-rodriguez
Copy link
Member

Edited, thanks for letting me know!

@garrettmichaelgeorge
Copy link

Great, indeed, doing gem update --system 3.0.8 && gem update --system fixes the warnings (and other duplication definitions warnings). Also fixes the version mismatch discussed in the other thread that I didn't iron out yet. Thanks!

This worked for me too! Had the same problem. Thanks!

@qortex
Copy link

qortex commented Oct 7, 2020

Weird, the error pops back in my Heroku environment (only) without any change on my part.
Is there any recent change that would explain that?

@qortex
Copy link

qortex commented Oct 7, 2020

I get this, with no change on my side. Even when just trying to open a console remotely on my Heroku instance. Works ok locally.

Quite at lost here. Any pointer appreciated:

/app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:105: warning: already initialized constant Bundler::FileUtils::VERSION
/app/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:105: warning: previous definition of VERSION was here
/app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/app/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: previous definition of S_IF_DOOR was here
/app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/app/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: previous definition of DIRECTORY_TERM was here
/app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/app/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: previous definition of OPT_TABLE was here
/app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/app/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: previous definition of LOW_METHODS was here
/app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: already initialized constant Bundler::FileUtils::METHODS
/app/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: previous definition of METHODS was here
Traceback (most recent call last):
	9: from /app/vendor/bundle/ruby/2.7.0/bin/bundle:23:in `<main>'
	8: from /app/vendor/bundle/ruby/2.7.0/bin/bundle:23:in `load'
	7: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:13:in `<top (required)>'
	6: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:13:in `require_relative'
	5: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler.rb:7:in `<top (required)>'
	4: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler.rb:7:in `require_relative'
	3: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:3:in `<top (required)>'
	2: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in `<module:Bundler>'
	1: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:20:in `<class:GemfileError>'
/app/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/errors.rb:9:in `status_code': Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered (ArgumentError)

@deivid-rodriguez
Copy link
Member

I just heard that heroku is now providing bundler 2.1.4 by default. It might be related.

@deivid-rodriguez
Copy link
Member

I'm guessing if heroku is not providing the rubygems version where this is fixed, the issue could reappear.

@schneems Which rubygems version are you providing in heroku? This issue was fixed in rubygems 3.1.3, if the heroku environment is using an older version, it might've reappeared with the bundler 2.1 upgrade.

@qortex
Copy link

qortex commented Oct 7, 2020

Ah makes sense.

Do you think of any short term workaround to pin the bundler version until it's fixed by heroku team?

@deivid-rodriguez
Copy link
Member

Not fully sure, I should setup a dummy heroku app at some point to investigate these things. Let's wait for input from heroku and see.

@qortex
Copy link

qortex commented Oct 7, 2020

Actually, found a bug report also on Heroku buildpack issues board: heroku/heroku-buildpack-ruby#1079

@deivid-rodriguez
Copy link
Member

That sounds like a different error?

@qortex
Copy link

qortex commented Oct 7, 2020

True sorry.

And reverting to a previous buildpack doesn't seem to cut it.
I can't make sense of all of this. It worked perfectly fine yesterday.

@schneems
Copy link
Contributor

schneems commented Oct 7, 2020

@schneems Which rubygems version are you providing in heroku?

Rubygems version is tightly coupled with Ruby version. If a major bug is fixed in rubygems, then it needs to be released in Ruby 2.5, 2.6, 2.7. You can see our RubyGems versions listed here https://devcenter.heroku.com/articles/ruby-support#supported-runtimes.

Actually, found a bug report also on Heroku buildpack issues board: heroku/heroku-buildpack-ruby#1079

This is a bug with CodeShip in the way they're deploying to Heroku. You need to manually delete the .bundle/config that they've accidentally sent over along with your code. I also recommend contacting their support to see if it can be fixed in their product.

@deivid-rodriguez
Copy link
Member

@qortex As per @schneems' post, it sounds like upgrading to ruby 2.7.2, if that's something you can do, would get you past this error, since it includes rubygems 3.1.4.

@qortex
Copy link

qortex commented Oct 8, 2020

Awesome, upgrading to 2.7.2 indeed fixes the issue. Great!

Thanks a lot for the troubleshooting & solution!

@tanpengsccd
Copy link

rvm install ruby 2.7.2

@bajajneha27
Copy link

I had the same issue, gem update --system fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.