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
#!/usr/bin/env bash | |
GITHUB_USER="tigris" | |
GITHUB_PROJECT=... | |
GIT_BRANCH="master" | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev libreadline-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz |
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
default['unicorn']['before_fork'] = %Q( | |
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect! | |
old_pid = '#{node['unicorn']['pid']}.oldbin' | |
if File.exists?(old_pid) && server.pid != old_pid | |
begin | |
Process.kill('QUIT', File.read(old_pid).to_i) | |
rescue Errno::ENOENT, Errno::ESRCH | |
puts 'Old master alerady dead' | |
end |
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
source 'http://rubygems.org' | |
gem 'rails', '4.0.0.beta1' | |
gem 'sqlite3' |