(Translated from the Japanese article.)
This is a quiz about Ruby's Bundler!
Add 8 characters to the following
Gemfileso thatbundle installfails (with non-zero exit code) for the second time or later.source "https://rubygems.org" gemspec
Notes:
- Bundler is a fairly recent version (approximately version 3 or later).
- The first invocation succeeds.
If you find the answer (on your own), please send me a direct message on ruby.social or email, etc.!
Wrong Answers
- An invalid URL like
https://rubygems.org12345678: It doesn't fail since Bundler doesn't refer to the URL. - An invalid URL and gems: It fails on the first run. It must fail only on the second or later runs.
- Something like this: It exeeds 8 characters.
source "https://rubygems.org"
gemspec
File.file?("Gemfile.lock") and raise
License
Copyright (C) 2026 gemmaro
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
Top comments (0)