execute 'apt-get update' %w(libffi-dev libreadline6-dev libssl-dev make zlib1g-dev).each do |pkg| package pkg end http_request 'ruby' do path "/usr/local/src/ruby-2.3.0.tar.gz" url "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz" not_if "test -e /usr/local/src/ruby-2.3.0.tar.gz" end execute "tar xf ruby-2.3.0.tar.gz" do cwd '/usr/local/src' only_if "test -e /usr/local/src/ruby-2.3.0.tar.gz" not_if "test -e /usr/local/src/ruby-2.3.0" end execute './configure && make && make install' do cwd "/usr/local/src/ruby-2.3.0" end