Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 188
Capistrano
Quentin Brossard edited this page Feb 6, 2014 · 7 revisions
chruby can be used with Capistrano to select a specific Ruby when deploying.
Support is provided out of the box when using Capistrano version 3.
Setup instructions are available here: https://github.com/capistrano/chruby
default_run_options[:shell] = '/bin/bash' set :ruby_version, "1.9.3-p327" set :chruby_config, "/usr/local/share/chruby/chruby.sh" set :set_ruby_cmd, "source #{chruby_config} && chruby #{ruby_version}" set(:bundle_cmd){"#{set_ruby_cmd} && exec bundle" } If chruby-exec is in your server's PATH (and if it's not, why isn't it?), the following solution will work, too:
set :ruby_version, "2.0" set :bundle_cmd, "chruby-exec #{ruby_version} -- bundle"