Skip to content
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

macOS installation - last step needs clarification #1572

Open
murfel opened this issue May 16, 2024 · 4 comments
Open

macOS installation - last step needs clarification #1572

murfel opened this issue May 16, 2024 · 4 comments

Comments

@murfel
Copy link

murfel commented May 16, 2024

I followed the steps to install with Homebrew on macOS, and received this message at the end,

# Load rbenv automatically by appending
# the following to ~/.zshrc:

eval "$(rbenv init - zsh)"

Context:

% brew install rbenv ruby-build. # step 1
... # installation succesful
% rbenv init  # step 2

# Load rbenv automatically by appending
# the following to ~/.zshrc:

eval "$(rbenv init - zsh)"

The instruction also provides step 3, "reload terminal for changes to take effect". I did that and I'm 95% sure that didn't help and I did need to modify my ~/.zshrc. (I did some mingling in the terminal and cannot remember the correct sequence to success.)

It would be beneficial to either add an explicit step to ignore this zshrc message, or to mention to follow it with / instead of reloading the terminal / doing source ~/.zshrc.

Thank you! :)

@jasonkarns
Copy link
Member

jasonkarns commented May 16, 2024

There is probably some room for clarification here. The instructions in step 3 "reload terminal for changes to take effect" is necessary after any changes are made to ones zshrc. (The addition of rbenv-init to the zshrc is in fact "the changes" being referred to that require a reload.) Any modifications to zshrc/profile only take effect when those files are sourced, which only happens when the shell is first launched.

So the instructions to add rbenv-init to your zshrc and the instructions to reload the terminal are not conflicting or redundant. Rather, the latter follows from the former.

I can see the confusion, however. The phrasing "Load rbenv automatically" could seem to imply the reload not being necessary.

@jasonkarns
Copy link
Member

I think it's also likely you might be running into some conflicting messaging. Just a few weeks ago, rbenv-init was modified to make the necessary changes to bashrc/zshrc/etc itself rather than printing the instructions for users to perform manually.

This new behavior is not released yet; and so the homebrew installation does not yet take advantage of it. What's more, rbenv's README instructions reflect the latest code _on rbenv's main branch. So if you view https://github.com/rbenv/rbenv#installation, you'll be seeing the installation steps that presume the still-unreleased behavior. 😬

I apologize for the confusion caused. I suspect most of this confusion should be sorted out once the next release is cut. Then the readme will be applicable and homebrew's installation will be able to take advantage of the streamlined install behavior.

@murfel
Copy link
Author

murfel commented May 20, 2024

Ah, I see, thank you! I'll stop stepping on your toes :)

@murfel murfel closed this as completed May 20, 2024
@jasonkarns jasonkarns reopened this May 20, 2024
@jasonkarns
Copy link
Member

If you don't mind, I think I'd like to keep this open until the next release. There might still be some improvement to the messaging between the readme, homebrew messaging, and rbenv init.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants