Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
Created June 2, 2009 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jerodsanto/122553 to your computer and use it in GitHub Desktop.
Save jerodsanto/122553 to your computer and use it in GitHub Desktop.
APTGET = "apt-get install -qqy"
RUBY19 = "ruby-1.9.1-p129"
SRC = "/usr/local/src"
WGET = "wget -q"
namespace :ruby do
desc 'download and compile Ruby 1.9'
task :install_19 do
deps = %w'zlib1g-dev libopenssl-ruby1.9'
version = RUBY19.gsub(/-p\d+$/,"") # remove patch level
run "#{APTGET} #{deps.join(' ')}"
cmd = [
"cd #{SRC}",
"#{WGET} ftp://ftp.ruby-lang.org/pub/ruby/1.9/#{RUBY19}.tar.gz",
"tar zxvf #{RUBY19}.tar.gz",
"cd #{RUBY19}",
"./configure --prefix=/opt/#{version} --enable-shared",
"make",
"make install"
].join(" && ")
run cmd
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment