Skip to content

Instantly share code, notes, and snippets.

@mdespuits
Last active December 25, 2015 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdespuits/6979931 to your computer and use it in GitHub Desktop.
Save mdespuits/6979931 to your computer and use it in GitHub Desktop.
Rails setup for Rails production server using Nginx, Git, Postgresql, and the speedy Recap capistrano gem.
#!/bin/sh
sudo apt-get -y update
sudo add-apt-repository ppa:nginx/stable
sudo apt-get -y update
sudo apt-get install -y git-core postgresql-9.1 mysql-server libpq-dev \
curl build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
if [ ! -e /usr/local/bin/gem ]; then
echo "Downloading Ruby..."
wget -q http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz
tar xvfz ruby-2.0.0-p247.tar.gz
cd ruby-2.0.0-p247/
echo "Installing Ruby..."
./configure --prefix=/usr/local
make
make install
echo "Updating all the things..."
sudo gem update --system
sudo gem install bundler --no-ri --no-rdoc
cd /tmp
rm -rf ruby-2.0.0-p247/
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment