* [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec`
@ 2025-12-01 15:16 osyoyu (Daisuke Aritomo) via ruby-core
2025-12-02 18:36 ` [ruby-core:123986] " osyoyu (Daisuke Aritomo) via ruby-core
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: osyoyu (Daisuke Aritomo) via ruby-core @ 2025-12-01 15:16 UTC (permalink / raw)
To: ruby-core; +Cc: osyoyu (Daisuke Aritomo)
Issue #21723 has been reported by osyoyu (Daisuke Aritomo).
----------------------------------------
Bug #21723: `binding.irb` raises a LoadError under `bundle exec`
https://bugs.ruby-lang.org/issues/21723
* Author: osyoyu (Daisuke Aritomo)
* Status: Open
* ruby -v: ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [arm64-darwin24]
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
In Ruby 4.0, `binding.irb` raises a LoadError when some unknown condition is met.
```ruby
# main.rb
binding.irb
```
```
main.rb:1: warning: irb used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add irb to your Gemfile or gemspec to fix this error.
Failed to activate irb, please install it with 'gem install irb'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
```
While irb has been changed to a bundle gem in #20309, it is agreed that `binding.irb` shall work under `bundle exec` without adding `irb` in Gemfile.
Thus, I've considered this behavior as an bug and created a ticket here.
One condition I have discovered is when the Gemfile contains a `gem` reference with a `path:` option.
I have created a repro repository in https://github.com/osyoyu/irbfail for that case.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:123986] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec`
2025-12-01 15:16 [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` osyoyu (Daisuke Aritomo) via ruby-core
@ 2025-12-02 18:36 ` osyoyu (Daisuke Aritomo) via ruby-core
2025-12-11 12:17 ` [ruby-core:124139] " hsbt (Hiroshi SHIBATA) via ruby-core
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: osyoyu (Daisuke Aritomo) via ruby-core @ 2025-12-02 18:36 UTC (permalink / raw)
To: ruby-core; +Cc: osyoyu (Daisuke Aritomo)
Issue #21723 has been updated by osyoyu (Daisuke Aritomo).
Here is a patch: https://github.com/ruby/ruby/pull/15373
----------------------------------------
Bug #21723: `binding.irb` raises a LoadError under `bundle exec`
https://bugs.ruby-lang.org/issues/21723#change-115414
* Author: osyoyu (Daisuke Aritomo)
* Status: Open
* ruby -v: ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [arm64-darwin24]
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
In Ruby 4.0, `binding.irb` raises a LoadError when some unknown condition is met.
```ruby
# main.rb
binding.irb
```
```
main.rb:1: warning: irb used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add irb to your Gemfile or gemspec to fix this error.
Failed to activate irb, please install it with 'gem install irb'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
```
While irb has been changed to a bundle gem in #20309, it is agreed that `binding.irb` shall work under `bundle exec` without adding `irb` in Gemfile.
Thus, I've considered this behavior as an bug and created a ticket here.
One condition I have discovered is when the Gemfile contains a `gem` reference with a `path:` option.
I have created a repro repository in https://github.com/osyoyu/irbfail for that case.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:124139] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec`
2025-12-01 15:16 [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` osyoyu (Daisuke Aritomo) via ruby-core
2025-12-02 18:36 ` [ruby-core:123986] " osyoyu (Daisuke Aritomo) via ruby-core
@ 2025-12-11 12:17 ` hsbt (Hiroshi SHIBATA) via ruby-core
2025-12-15 10:21 ` [ruby-core:124203] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:` osyoyu (Daisuke Aritomo) via ruby-core
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2025-12-11 12:17 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #21723 has been updated by hsbt (Hiroshi SHIBATA).
Status changed from Open to Assigned
Assignee set to hsbt (Hiroshi SHIBATA)
----------------------------------------
Bug #21723: `binding.irb` raises a LoadError under `bundle exec`
https://bugs.ruby-lang.org/issues/21723#change-115595
* Author: osyoyu (Daisuke Aritomo)
* Status: Assigned
* Assignee: hsbt (Hiroshi SHIBATA)
* ruby -v: ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [arm64-darwin24]
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
In Ruby 4.0, `binding.irb` raises a LoadError when some unknown condition is met.
```ruby
# main.rb
binding.irb
```
```
main.rb:1: warning: irb used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add irb to your Gemfile or gemspec to fix this error.
Failed to activate irb, please install it with 'gem install irb'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
```
While irb has been changed to a bundle gem in #20309, it is agreed that `binding.irb` shall work under `bundle exec` without adding `irb` in Gemfile.
Thus, I've considered this behavior as an bug and created a ticket here.
One condition I have discovered is when the Gemfile contains a `gem` reference with a `path:` option.
I have created a repro repository in https://github.com/osyoyu/irbfail for that case.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:124203] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
2025-12-01 15:16 [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` osyoyu (Daisuke Aritomo) via ruby-core
2025-12-02 18:36 ` [ruby-core:123986] " osyoyu (Daisuke Aritomo) via ruby-core
2025-12-11 12:17 ` [ruby-core:124139] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2025-12-15 10:21 ` osyoyu (Daisuke Aritomo) via ruby-core
2025-12-23 8:37 ` [ruby-core:124350] " hsbt (Hiroshi SHIBATA) via ruby-core
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: osyoyu (Daisuke Aritomo) via ruby-core @ 2025-12-15 10:21 UTC (permalink / raw)
To: ruby-core; +Cc: osyoyu (Daisuke Aritomo)
Issue #21723 has been updated by osyoyu (Daisuke Aritomo).
I have discovered that this issue reproduces when Gemfile contains a gem referred by `path:` or `git:`.
Such Gemfiles are pretty much common in real-world applications including Rails, which use in-house Gems and libraries, like this:
```ruby
# binding.irb will fail under this Gemfile
gem "some-inhouse-gem", git: 'https://github.com/our-company/some-inhouse-gem.git'
```
Can the patch visited before Ruby 4.0 release?
----------------------------------------
Bug #21723: `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
https://bugs.ruby-lang.org/issues/21723#change-115678
* Author: osyoyu (Daisuke Aritomo)
* Status: Assigned
* Assignee: hsbt (Hiroshi SHIBATA)
* ruby -v: ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [arm64-darwin24]
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
In Ruby 4.0, `binding.irb` raises a LoadError when some unknown condition is met.
```ruby
# main.rb
binding.irb
```
```
main.rb:1: warning: irb used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add irb to your Gemfile or gemspec to fix this error.
Failed to activate irb, please install it with 'gem install irb'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
```
While irb has been changed to a bundle gem in #20309, it is agreed that `binding.irb` shall work under `bundle exec` without adding `irb` in Gemfile.
Thus, I've considered this behavior as an bug and created a ticket here.
One condition I have discovered is when the Gemfile contains a `gem` reference with a `path:` option.
I have created a repro repository in https://github.com/osyoyu/irbfail for that case.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:124350] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
2025-12-01 15:16 [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` osyoyu (Daisuke Aritomo) via ruby-core
` (2 preceding siblings ...)
2025-12-15 10:21 ` [ruby-core:124203] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:` osyoyu (Daisuke Aritomo) via ruby-core
@ 2025-12-23 8:37 ` hsbt (Hiroshi SHIBATA) via ruby-core
2026-01-16 1:49 ` [ruby-core:124569] " hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-09 21:39 ` [ruby-core:124744] " k0kubun (Takashi Kokubun) via ruby-core
5 siblings, 0 replies; 7+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2025-12-23 8:37 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #21723 has been updated by hsbt (Hiroshi SHIBATA).
I have no enough time to handle this for Ruby 4.0.0.
Please add `irb` to your Gemfile or wait to release 4.0.1. Sorry to your inconvenience.
----------------------------------------
Bug #21723: `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
https://bugs.ruby-lang.org/issues/21723#change-115861
* Author: osyoyu (Daisuke Aritomo)
* Status: Assigned
* Assignee: hsbt (Hiroshi SHIBATA)
* ruby -v: ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [arm64-darwin24]
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
In Ruby 4.0, `binding.irb` raises a LoadError when some unknown condition is met.
```ruby
# main.rb
binding.irb
```
```
main.rb:1: warning: irb used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add irb to your Gemfile or gemspec to fix this error.
Failed to activate irb, please install it with 'gem install irb'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
```
While irb has been changed to a bundle gem in #20309, it is agreed that `binding.irb` shall work under `bundle exec` without adding `irb` in Gemfile.
Thus, I've considered this behavior as an bug and created a ticket here.
One condition I have discovered is when the Gemfile contains a `gem` reference with a `path:` option.
I have created a repro repository in https://github.com/osyoyu/irbfail for that case.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:124569] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
2025-12-01 15:16 [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` osyoyu (Daisuke Aritomo) via ruby-core
` (3 preceding siblings ...)
2025-12-23 8:37 ` [ruby-core:124350] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2026-01-16 1:49 ` hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-09 21:39 ` [ruby-core:124744] " k0kubun (Takashi Kokubun) via ruby-core
5 siblings, 0 replies; 7+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2026-01-16 1:49 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #21723 has been updated by hsbt (Hiroshi SHIBATA).
Status changed from Assigned to Closed
Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED
I created backport PR for Ruby 4.0: https://github.com/ruby/ruby/pull/15881
----------------------------------------
Bug #21723: `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
https://bugs.ruby-lang.org/issues/21723#change-116143
* Author: osyoyu (Daisuke Aritomo)
* Status: Closed
* Assignee: hsbt (Hiroshi SHIBATA)
* ruby -v: ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [arm64-darwin24]
* Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED
----------------------------------------
In Ruby 4.0, `binding.irb` raises a LoadError when some unknown condition is met.
```ruby
# main.rb
binding.irb
```
```
main.rb:1: warning: irb used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add irb to your Gemfile or gemspec to fix this error.
Failed to activate irb, please install it with 'gem install irb'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
```
While irb has been changed to a bundle gem in #20309, it is agreed that `binding.irb` shall work under `bundle exec` without adding `irb` in Gemfile.
Thus, I've considered this behavior as an bug and created a ticket here.
One condition I have discovered is when the Gemfile contains a `gem` reference with a `path:` option.
I have created a repro repository in https://github.com/osyoyu/irbfail for that case.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ruby-core:124744] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
2025-12-01 15:16 [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` osyoyu (Daisuke Aritomo) via ruby-core
` (4 preceding siblings ...)
2026-01-16 1:49 ` [ruby-core:124569] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2026-02-09 21:39 ` k0kubun (Takashi Kokubun) via ruby-core
5 siblings, 0 replies; 7+ messages in thread
From: k0kubun (Takashi Kokubun) via ruby-core @ 2026-02-09 21:39 UTC (permalink / raw)
To: ruby-core; +Cc: k0kubun (Takashi Kokubun)
Issue #21723 has been updated by k0kubun (Takashi Kokubun).
Backport changed from 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONTNEED, 4.0: DONE
ruby_4_0 commit:83479483c96fdfffbde11af482c7fd920b0c1dea.
----------------------------------------
Bug #21723: `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:`
https://bugs.ruby-lang.org/issues/21723#change-116346
* Author: osyoyu (Daisuke Aritomo)
* Status: Closed
* Assignee: hsbt (Hiroshi SHIBATA)
* ruby -v: ruby 4.0.0preview2 (2025-11-17 master 4fa6e9938c) +PRISM [arm64-darwin24]
* Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONTNEED, 4.0: DONE
----------------------------------------
In Ruby 4.0, `binding.irb` raises a LoadError when some unknown condition is met.
```ruby
# main.rb
binding.irb
```
```
main.rb:1: warning: irb used to be loaded from the standard library, but is not part of the default gems since Ruby 4.0.0.
You can add irb to your Gemfile or gemspec to fix this error.
Failed to activate irb, please install it with 'gem install irb'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
/Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'Kernel.require': cannot load such file -- irb (LoadError)
Did you mean? erb
from /Users/osyoyu/.rbenv/versions/master/lib/ruby/4.0.0+0/bundled_gems.rb:60:in 'block (2 levels) in Kernel#replace_require'
from main.rb:1:in 'Binding#irb'
from main.rb:1:in '<main>'
```
While irb has been changed to a bundle gem in #20309, it is agreed that `binding.irb` shall work under `bundle exec` without adding `irb` in Gemfile.
Thus, I've considered this behavior as an bug and created a ticket here.
One condition I have discovered is when the Gemfile contains a `gem` reference with a `path:` option.
I have created a repro repository in https://github.com/osyoyu/irbfail for that case.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-02-09 21:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01 15:16 [ruby-core:123966] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` osyoyu (Daisuke Aritomo) via ruby-core
2025-12-02 18:36 ` [ruby-core:123986] " osyoyu (Daisuke Aritomo) via ruby-core
2025-12-11 12:17 ` [ruby-core:124139] " hsbt (Hiroshi SHIBATA) via ruby-core
2025-12-15 10:21 ` [ruby-core:124203] [Ruby Bug#21723] `binding.irb` raises a LoadError under `bundle exec` when Gemfile contains `path:` or `git:` osyoyu (Daisuke Aritomo) via ruby-core
2025-12-23 8:37 ` [ruby-core:124350] " hsbt (Hiroshi SHIBATA) via ruby-core
2026-01-16 1:49 ` [ruby-core:124569] " hsbt (Hiroshi SHIBATA) via ruby-core
2026-02-09 21:39 ` [ruby-core:124744] " k0kubun (Takashi Kokubun) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).