RiotGamesCookbooks / rbenv-cookbook

Installs and configures rbenv
http://community.opscode.com/cookbooks/rbenv
Apache License 2.0
137 stars 109 forks source link

rbenv not initialised for zsh users #70

Open sentience opened 10 years ago

sentience commented 10 years ago

The rbenv::default recipe drops a rbenv.sh file in /etc/profile.d, which is intended to automatically initialise rbenv for all users on the system at login. Unfortunately, this does not work for users that have ZSH as their login shell, because ZSH doesn't run /etc/profile.

In theory, ZSH runs /etc/zprofile, which at least on some systems is supposed to run all the scripts in /etc/zprofile.d, but that doesn't seem to be the setup on Ubuntu systems with the standard zsh package installed.

Any ideas on how best to automate initialisation of rbenv for ZSH users?

sentience commented 10 years ago

Here's my workaround for now: Use a tweaked version of the oh-my-zsh cookbook that has oh-my-zsh configured to load the rbenv plug-in for all users. This plug-in correctly detects and initialises rbenv installed in /opt/rbenv.