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 directory search order with brew #3808
Conversation
Hi, and thanks for contributing. You will have to Then please find a few people to test and +1 this. |
+1 I haven't tested this but I have encountered the same problem on OSX and brew installed rbenv. Traced the issue with the brew directory taking priority over the $HOME directories for rubies. |
Is the bug still present? @mmorga @mcornella |
I have no idea... @gchan ? |
Yes. I just enabled the rbenv plugin and this still happens. |
Probably this is why I opened #3275 |
Yes @mbologna, the code changes in #3275 are very similar to this PR. Unsure about the reason for line 12 (https://github.com/robbyrussell/oh-my-zsh/pull/3808/files#diff-22fdd1fcfb5b98380f344442393e1f6fL12) however. |
@gchan @mcornella @mmorga please check with #4384 if it solves your problem |
@caesarsol #4384 does not infer anything from |
I'm sorry, isn't the diff only deleting lines 7~10? |
@mbologna sorry for the misunderstanding, what I'm saying is: |
@caesarsol this PR is another PR. I did not write it. |
Thank for the fix! |
The bug is that as-written, rbenv (if installed by brew) always uses the brew prefix directory and the RBENV_ROOT. But the default desired behavior of rbenv is to use the $HOME/.rbenv to store installed rubies. As a result, you get the system ruby only.
My change builds upon the #3275 pull request from @mbologna and reverses the order of the search directories for rbenv to put the brew prefix last.
Since this bug only occurs for brew users, non-OSX users will not be affected.