Created
June 30, 2009 21:16
-
-
Save nz/138430 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
### | |
# Install and configure Ruby Enterprise Edition | |
## | |
# TODO: A future release of Chef should have a source_package resource to handle installs like this | |
version = "1.8.6-20090610" # TODO: move to an attribute | |
package "libreadline5-dev" | |
package "libssl-dev" | |
remote_file "/tmp/ruby-enterprise-#{version}.tar.gz" do | |
source "http://rubyforge.org/frs/download.php/58677/ruby-enterprise-#{version}.tar.gz" | |
mode "0644" | |
end | |
execute "tar zxvf ruby-enterprise-#{version}.tar.gz" do | |
cwd "/tmp" | |
not_if "test -d /tmp/ruby-enterprise-#{version}" | |
end | |
execute "install ruby enterprise" do | |
command "echo -en \"\n\n\n\" | ./installer" | |
cwd "/tmp/ruby-enterprise-#{version}" | |
not_if "test -f /opt/ruby-enterprise-#{version}/bin/ruby" | |
end | |
%w(ruby rake irb gem).each do |cmd| | |
link "/opt/ruby-enterprise-#{version}/bin/#{bin}" do | |
to "/usr/bin/#{cmd}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment