You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with someone on a chef project. He suggested we add some code to initialize rbenv for all users. I thought this cookbook was already doing that by adding the /etc/profile.d/rbenv.sh file. He said that those files only load for interactive sessions, but not all (i.e. ssh $node "command").
Here's the code that he wrote. I hate to have duplicate/unnecessary code. Is this something that can/should be incorporated into the official rbenv cookbook, or is it an appropriate supplement to the cookbook?
# install Rubyinclude_recipe'rbenv::default'include_recipe'rbenv::ruby_build'rbenv_ruby'2.1.2'doruby_version'2.1.2'globaltrueendrbenv_gem'bundler'doversion'1.6.2'ruby_version'2.1.2'action:installend# initialize rbenv for all usersexecute'add rbenv to $PATH'docommand'echo \'export PATH="/opt/rbenv/bin:$PATH"\' >> /etc/bash.bashrc'not_if'grep -F "rbenv/bin" /etc/bash.bashrc'endexecute"add rbenv to global .bashrc"docommand'echo \'eval "$(rbenv init -)"\' >> /etc/bash.bashrc'not_if'grep -F "rbenv init" /etc/bash.bashrc'endexecute"add rbenv to global .profile"docommand'echo \'eval "$(rbenv init -)"\' >> /etc/profile'not_if'grep -F "rbenv init" /etc/profile'end
The text was updated successfully, but these errors were encountered:
I'm working with someone on a chef project. He suggested we add some code to initialize
rbenv
for all users. I thought this cookbook was already doing that by adding the/etc/profile.d/rbenv.sh
file. He said that those files only load for interactive sessions, but not all (i.e.ssh $node "command"
).Here's the code that he wrote. I hate to have duplicate/unnecessary code. Is this something that can/should be incorporated into the official
rbenv
cookbook, or is it an appropriate supplement to the cookbook?The text was updated successfully, but these errors were encountered: