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

non bash shell support #46

Open
TomNaessens opened this issue Jul 5, 2015 · 1 comment
Open

non bash shell support #46

TomNaessens opened this issue Jul 5, 2015 · 1 comment

Comments

@TomNaessens
Copy link

Placing the rbenv init - script in the /etc/profile.d folder (in https://github.com/zzet/ansible-rbenv-role/blob/master/tasks/main.yml#L87) should enable a systemwide installation for all users. This only works with shells using the /etc/profile.d folder. For example, zsh does not rely on this folder, so users using zsh end up with unfound commands for both ruby and rbenv.

@arusa
Copy link

arusa commented Aug 31, 2021

I solved it with a line in my playbook tasks:

- name: enable rbenv for zsh
   lineinfile:
     path: /home/xxxx/.zprofile
     line: 'source /etc/profile.d/rbenv.sh'

You could create a variable to enable zsh support and then loop through all rbenv-users to add a line to .zprofile in their homedir.

It could also work with a global /etc/zsh/zprofile, but I'm not sure where the optimal place would be and I have read about different places like /etc/zprofile.

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

No branches or pull requests

3 participants