Project

General

Profile

Actions

Bug #15503

closed

Error in Ruby 2.6 when trying to shell out to invoke `irb` while in a `bundle exec` session

Bug #15503: Error in Ruby 2.6 when trying to shell out to invoke `irb` while in a `bundle exec` session

Added by schneems (Richard Schneeman) almost 7 years ago. Updated over 6 years ago.

Status:
Third Party's Issue
Target version:
-
ruby -v:
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin17]
[ruby-core:90878]

Description

Hello. This script fails on Ruby 2.6 but works successfully with Ruby 2.5:

cd /tmp mkdir irb-issue cd irb-issue chruby 2.6 echo 'source "https://rubygems.org"' > Gemfile bundle install bundle exec ruby -e 'puts `echo "1 + 1" | irb --simple-prompt`' 

Here is the failure:

$ bundle exec ruby -e 'puts `echo "1 + 1" | irb --simple-prompt`' Traceback (most recent call last):	2: from /Users/rschneeman/.gem/ruby/2.6.0/bin/irb:23:in `<main>'	1: from /Users/rschneeman/.rubies/ruby-2.6.0/lib/ruby/2.6.0/bundler/rubygems_integration.rb:482:in `block in replace_bin_path' /Users/rschneeman/.rubies/ruby-2.6.0/lib/ruby/2.6.0/bundler/rubygems_integration.rb:462:in `block in replace_bin_path': can't find executable irb for gem irb. irb is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception) 

Updated by hsbt (Hiroshi SHIBATA) almost 7 years ago Actions #1 [ruby-core:90882]

  • Status changed from Open to Assigned
  • Assignee set to hsbt (Hiroshi SHIBATA)

Updated by segiddins (Samuel Giddins) almost 7 years ago Actions #2 [ruby-core:91111]

schneems (Richard Schneeman) wrote:

Hello. This script fails on Ruby 2.6 but works successfully with Ruby 2.5:

I believe that's because irb was not a gem in Ruby 2.5 and was part of the stdlib, but in 2.6 it's a gem.

Updated by deivid (David Rodríguez) over 6 years ago Actions #3 [ruby-core:91538]

I proposed a fix for this issue to the bundler repo in https://github.com/bundler/bundler/pull/6963.

Updated by nobu (Nobuyoshi Nakada) over 6 years ago Actions #4

  • Status changed from Assigned to Third Party's Issue
Actions

Also available in: PDF Atom