-
-
Notifications
You must be signed in to change notification settings - Fork 192
Capistrano
postmodern edited this page Nov 29, 2012
·
7 revisions
chruby can be used with Capistrano to select a specific Ruby when deploying.
default_run_options[:shell] = '/bin/bash'
set :ruby_version, "1.9.3-p327"
# content of .rubies file
# RUBIES=(
# /opt/rubies/1.9.3-p327
# )
set :rubies_defenitions, "/home/#{user}/.rubies"
set :chruby_script, "/usr/local/share/chruby/chruby.sh"
set :set_ruby_cmd, ". #{chruby_script} && . #{rubies_defenitions} && chruby #{ruby_version}"
set(:bundle_cmd) {
"#{set_ruby_cmd} && exec bundle"
}