Skip to content

Instantly share code, notes, and snippets.

@ericallam
Created June 22, 2012 20:47
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 ericallam/2975082 to your computer and use it in GitHub Desktop.
Save ericallam/2975082 to your computer and use it in GitHub Desktop.
Provisioning a slicehost for RoR
# Provisioning a slicehost for RoR
apt-get update
apt-get upgrade -y
# install dependencies
/usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion libcurl4-openssl-dev
# install rvm
sudo curl -L https://get.rvm.io | bash -s stable --ruby
# source rvm
source /etc/profile.d/rvm.sh
# install 1.9.3
rvm install 1.9.3
# install passenger
gem install passenger
# install the passenger module for nginx (choose option 1 when asked)
passenger-install-nginx-module (choose 1)
# setup nginx init.d script /etc/init.d/nginx
# https://gist.github.com/44c734e83ca0dc0da504#comments
/usr/sbin/update-rc.d -f nginx defaults
/etc/init.d/nginx start
# nginx site config:
/opt/nginx/conf/nginx.conf
# example nginx config for passenger
# server {
# listen 80;
# server_name status.codeschool.com;
# root /var/rails/code_school_status/current/public; # <--- be sure to point to 'public'!
# passenger_enabled on;
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment