New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rbenv short circuits commands #1374
Comments
It does look like a dupe of #187, good catch. There's an outstanding PR #1110 that purports to address the nearly 10 year old #187. If #1110 fixes it, can we get that merged please? Creating symlinks in |
Thanks for raising, @jasonkarns. Closing as duplicate. The reason why this hasn't been fixed after such a long time of being a known issue is that the fix isn't clear-cut. Simply falling back to PATH if an executable wasn't found in the current Ruby version might be a good solution to your problem, but would fundamentally go against the strict separation of versions that rbenv enforces. What if the current Ruby version does not have the Why do any Ruby gems or tooling install executables like |
@mislav thanks for taking the time to explain. I genuinely appreciate the insight you provided. I tend to agree with you that overriding Symlinks in
|
rbenv
seems to be short-circuiting system commands (iecurl
,clear
,openssl
) if they're present in one rbenv, but not another:for clarity -
3.0.2c
here is the chef/cinc bundled ruby (comes with a bunch of extra gems and other things to try to ship a complete system-independent environment), while3.0.2
is a "clean" ruby used for non-chef ruby projects.In this example,
clear
is both in the3.0.2c
path, and at/usr/bin/clear
, but rbenv short-circuits that because while it doesn't seeclear
in this ruby environment, it sees it in another one - which means this ruby environment is the "problem" if you will. The same thing happens for commands likecurl
andopenssl
. Why does chef's ruby includeclear
andcurl
commands? I assumecurl
is to make sure it's available, butclear
I have no idea.If I had to come up with a solution, I think probably rbenv should let or try to let the shell fall back to the rest of the
PATH
env entries, or check to see if the command is available on thePATH
outside of rbenv and redirect to it if possible, rather than "this rbenv doesn't have the command, but another one does, so this is an error -> exit with127
"The text was updated successfully, but these errors were encountered: