Skip to content

Instantly share code, notes, and snippets.

@iewnait
Created April 7, 2013 21:09
Show Gist options
  • Save iewnait/5332536 to your computer and use it in GitHub Desktop.
Save iewnait/5332536 to your computer and use it in GitHub Desktop.
set :stages, %w(production sandbox)
set :default_stage, "sandbox"
require 'capistrano/ext/multistage'
set :application, "blogtest"
set :repository, "git@github.com:iewnait/blogtest.git"
default_run_options[:pty] = true
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :deploy_to, "/home/deployer/apps/blogtest"
set :user, "deployer"
set :use_sudo, false
set :rvm_ruby_string, "1.9.3-p327@#{application}"
set :rvm_install_pkgs, %w[libyaml openssl] # package list from https://rvm.io/packages
set :rvm_install_ruby_params, '--with-opt-dir=/usr/local/rvm/usr --autolibs=4' # package support
before 'deploy:setup', 'rvm:install_rvm' # install RVM
before 'deploy:setup', 'rvm:install_pkgs' # install RVM packages before Ruby
before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or:
before 'deploy:setup', 'rvm:create_gemset' # only create gemset
before 'deploy:setup', 'rvm:import_gemset' # import gemset from file
require "rvm/capistrano"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment