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
Comments
With previous version, Bundler 2.0.2, This error is not occurred.
logsuzuki_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 |
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 Thanks again! |
Forget about it, I can reproduce it by configuring bundler like |
I'm still investigating the cause, but |
Hi @deivid-rodriguez Yes, exactly I am setting install path via
Also for me, I want to investigate the reason, but I should make my new web app for Interview test until next week. |
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
|
Still the same issue with bundler 2.1.4, Ruby 2.7.0. EDIT: Saw issue https://github.com/rubygems/bundler/issues/7504 and followed the advice. This seems to 'fix' it. |
Thanks for the repros without against the latest version of rubygems. I'll try to have a look. |
Interestingly I have a similar issue on our CI, but i use the versions described in the workaround:
Additional versions:
What I find interesting in the backtrace and output:
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. |
Just to confirm, downgrading to 2.1.2 so that it uses the default bundler worked. |
I hit the same issue, but I generate a binstub for 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 Running |
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. |
Great, indeed, doing |
Nice! So everything might be the same issue after all. |
I am still getting this error, but I am doing something different. I am running:
I initially got this error when running the But I am also able to duplicate this issue in my project by simply trying to run: See an example below.
|
So I should assume you already tried downgrading and upgrading back, right? |
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 Thanks for the tip @deivid-rodriguez! |
This worked absolutely fine. |
Note that the fix for this issue was released with |
You mean |
Yes, sorry! |
Edited, thanks for letting me know! |
This worked for me too! Had the same problem. Thanks! |
Weird, the error pops back in my Heroku environment (only) without any change on my part. |
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:
|
I just heard that heroku is now providing bundler 2.1.4 by default. It might be related. |
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. |
Ah makes sense. Do you think of any short term workaround to pin the bundler version until it's fixed by heroku team? |
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. |
Actually, found a bug report also on Heroku buildpack issues board: heroku/heroku-buildpack-ruby#1079 |
That sounds like a different error? |
True sorry. And reverting to a previous buildpack doesn't seem to cut it. |
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.
This is a bug with CodeShip in the way they're deploying to Heroku. You need to manually delete the |
Awesome, upgrading to 2.7.2 indeed fixes the issue. Great! Thanks a lot for the troubleshooting & solution! |
rvm install ruby 2.7.2 |
I had the same issue, |
Thanks for update bundler to 2.1.0 馃帀
But today when I creating a new rails app, bundler had an error below.
My environment
Command I ran
Short log
Full log
The text was updated successfully, but these errors were encountered: