chruby: Running chruby-exec from ruby hangs the shell

For example if you run ruby -e "puts chruby-exec ruby-2.0.0 – ruby --version" you can see it spawning a shell which uses 100% CPU.

I don’t know if rewriting chruby-exec into a function (https://github.com/postmodern/chruby/issues/127) would solve this issue.

About this issue

  • Original URL
  • State: open
  • Created 11 years ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

I can also confirm this bug when in Bash, using wwtd which shells out to chruby-exec.

And also with the IRB examples mentioned above:

$ irb 

> `chruby-exec 2.6 -- ruby -v`
"ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]\n"

[1]+  Stopped                 irb