Created
September 17, 2010 20:19
-
-
Save bixu/584877 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
%w/openssl-devel memcached mysql-devel gcc-c++ ncurses-devel httpd-devel libpcap-devel iptraf gcc autoconf automake curl-devel net-snmp-devel readline-devel pcre-devel gcc zlib-devel git/.each do |pkg| | |
package pkg do | |
action [:install] | |
end | |
end | |
user "user" do | |
comment "User Application" | |
uid "3011" | |
gid "users" | |
home "/home/user" | |
shell "/bin/bash" | |
end | |
template "/home/user/.bash_profile" do | |
source "bash_profile.erb" | |
end | |
file "/home/user/.bash_profile" do | |
owner "user" | |
group "user" | |
mode "0700" | |
action :create | |
end | |
bash "Install RVM" do | |
user "user" | |
code "bash < <( curl -L http://rvm.beginrescueend.com/releases/rvm-install-head )" | |
# not_if "test -x /home/user/.rvm/bin/rvm" | |
not_if "rvm --version" | |
end | |
bash "Install the version of Ruby we want via RVM" do | |
user "user" | |
code "~/.rvm/bin/rvm install 1.8.7" | |
code "~/.rvm/bin/rvm --default 1.8.7" | |
not_if "rvm list | grep 1.8.7" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment