Skip to content

Instantly share code, notes, and snippets.

@reset
Created August 29, 2012 02:52
Show Gist options
  • Save reset/3506345 to your computer and use it in GitHub Desktop.
Save reset/3506345 to your computer and use it in GitHub Desktop.
git node[:rbenv][:root] do
repository node[:rbenv][:git_repository]
reference node[:rbenv][:git_revision]
user "rbenv"
group "rbenv"
action :sync
notifies :create, "ruby_block[init_rbenv_env]", :immediately
end
ruby_block "init_rbenv_env" do
block do
ENV['RBENV_ROOT'] = node[:rbenv][:root]
ENV['PATH'] = "#{node[:rbenv][:root]}/bin:#{node[:ruby_build][:bin_path]}:#{ENV['PATH']}"
end
action :nothing
end
bash "check rbenv" do
code "which rbenv"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment