Sha256: b17861a0bede53c8627c2844e71c8d7abbf1010c2860e2f5ffca3c2424f74c7f

Contents?: true

Size: 968 Bytes

Versions: 2

Compression:

Stored size: 968 Bytes

Contents

namespace :ruby do 
  
  namespace :centos do
  
    desc <<-DESC
    Install ruby and rubygems.
    
    *ruby_build_options*: Ruby build options.\n
    *rubygems_build_options*: Rubygems build options.\n
    <pre>
    set :ruby_build_options, {
      :url => "http://capitate.s3.amazonaws.com/ruby-1.8.6-p110.tar.gz",
      :build_dest => "/usr/src",
      :configure_options => "--prefix=/usr",       
      :clean => false
    }
    </pre>
    DESC
    task :install do 

      # Settings
      fetch(:ruby_build_options)
      fetch(:rubygems_build_options)
    
      # Install dependencies
      yum.install([ "zlib", "zlib-devel", "readline-devel" ])
    
      # Install ruby 1.8.6
      script.make_install("ruby", ruby_build_options)
    
      # Install rubygems
      script.install("rubygems", rubygems_build_options) do |dir|
        run_via "cd #{dir} && ruby setup.rb > install.log", { :shell => true }
      end
    
    end        
    
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capitate-0.2.6 lib/recipes/centos/ruby.rb
capitate-0.2.5 lib/recipes/centos/ruby.rb