Skip to content

Commit f8ccc0a

Browse files
hsbtmatzbot
authored andcommitted
[ruby/rubygems] Forcely activate irb if that isn't available when running with bundle console
ruby/rubygems@42e22fd367
1 parent 0eaea7b commit f8ccc0a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/bundler/cli/console.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ def get_console(name)
2121
get_constant(name)
2222
rescue LoadError
2323
if name == "irb"
24+
if defined?(Gem::BUNDLED_GEMS) && Gem::BUNDLED_GEMS.respond_to?(:force_activate)
25+
Gem::BUNDLED_GEMS.force_activate "irb"
26+
require name
27+
return get_constant(name)
28+
end
2429
Bundler.ui.error "#{name} is not available"
2530
exit 1
2631
else

0 commit comments

Comments
 (0)