From fd55a56235d10baf2bb1320bee03adaaf9f87c15 Mon Sep 17 00:00:00 2001 From: Michael Sofaer <msofaer@pivotallabs.com> Date: Sun, 31 Oct 2010 17:02:22 -0700 Subject: [PATCH] Symlink the RVM wrapper scripts to /usr/local/bin --- chef/cookbooks/centos/recipes/bootstrap.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/chef/cookbooks/centos/recipes/bootstrap.rb b/chef/cookbooks/centos/recipes/bootstrap.rb index bf7b5da361..86326a7dc0 100644 --- a/chef/cookbooks/centos/recipes/bootstrap.rb +++ b/chef/cookbooks/centos/recipes/bootstrap.rb @@ -6,4 +6,14 @@ execute "nokogiri deps" do end execute "eventmachine deps" do command "yum install -y gcc-c++" -end \ No newline at end of file +end + +def harden_ruby(ruby_string) + Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file| + link "/usr/local/bin/#{file.split('/').last}" do + to file + end + end +end + +harden_ruby("ruby-1.8.7-p302") \ No newline at end of file -- GitLab