Created
May 24, 2012 09:20
-
-
Save zozo/2780426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash "install rvm" do | |
user project_id | |
environment ({'HOME' => "/home/#{user_id}"}) | |
code "curl -L get.rvm.io | bash -s stable; echo '[[ -s \"$HOME/.rvm/scripts/rvm\" ]] && . \"$HOME/.rvm/scripts/rvm\"' >> ~/.bashrc" | |
not_if "test -d /home/#{project_id}/.rvm" | |
end | |
bash "install ruby #{ruby_version}" do | |
user project_id | |
environment ({'HOME' => "/home/#{user_id}"}) | |
code "PATH=$PATH:$HOME/.rvm/bin; rvm install #{ruby_version};" | |
not_if "test -d /home/#{project_id}/.rvm/rubies/#{ruby_version}" | |
end | |
bash "install ruby #{ruby_version} as default in rvm" do | |
user user_id | |
environment ({'HOME' => "/home/#{user_id}"}) | |
code "PATH=$PATH:$HOME/.rvm/bin; rvm use #{ruby_version} --default" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment