Benoit Daloze
Benoit Daloze
Appending to PATH won't work if there are gem binaries or `ruby` already in PATH, e.g., from the system Ruby.
What if there are system gems installed, e.g. `/usr/bin/rspec`? That would pick the wrong executable.
On the 1.0.0 branch it's like `~/.gem/ruby-2.6.3` for `~/.rubies/ruby-2.6.3` (1 level under .gem). That's already distinct from RubyGems which defaults to `~/.gem/ruby/2.6.0` (2 levels under .gem). Being more explicitly separated...
From a quick look there is a good reason why to no share gems (at least C extensions) between different versions, even if they claim to have the same ABI...
> I do know that Debian and RedHat based Linux distros are very careful about their packages relying on an explicit ruby via `#!/usr/bin/ruby` to prevent this from happening. This...
I got the same issue, when doing this in Zsh: ```bash $ ruby -e '2.times { system("chruby-exec 2.4.1 -- ruby -v") }' ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] zsh: suspended...
@postmodern What do you think of this? Should `-i` not be passed?
Those commits don't mention the performance cost of shims though, so it seems a separate concern. :+1: for this PR.
Related: https://github.com/postmodern/chruby/issues/449
Note: the rubies that `chruby` see could be any valid directory name, so it might be e.g. `foo-bar`, so there isn't always a version. I'm not sure what's a good...