Skip to content

Instantly share code, notes, and snippets.

@bixu
Created September 17, 2010 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bixu/584877 to your computer and use it in GitHub Desktop.
Save bixu/584877 to your computer and use it in GitHub Desktop.
%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