Skip to content

Instantly share code, notes, and snippets.

@theSociableme
Last active August 29, 2015 14:04
Show Gist options
  • Save theSociableme/6ff35eb7f3f8bc8c4db4 to your computer and use it in GitHub Desktop.
Save theSociableme/6ff35eb7f3f8bc8c4db4 to your computer and use it in GitHub Desktop.
Capistrano
Add to Gemfile
gem 'capistrano'
gem 'capistrano-ext'
gem 'capistrano-rvm'
gem 'capistrano-rails'
gem 'capistrano-bundler'
Install Capistrano
cap install
Add the following to the middle of the Capfile
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
Add the following to the end of the Capfile
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
Update ~/.rvmrc file to fix RVM is not a function
export rvm_path="/home/app_user/.rvm"
export rvm_project_rvmrc=1
export rvm_gemset_create_on_use_flag=1
export rvm_trust_rvmrcs_flag=1
# get rvm for non-interactive shells (eg capistrano) too
export BASH_ENV=$HOME/.bashrc
export rvm_is_not_a_shell_function=0
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment