Skip to content

Instantly share code, notes, and snippets.

@threedaymonk
Created October 30, 2010 19:19
Show Gist options
  • Select an option

  • Save threedaymonk/655649 to your computer and use it in GitHub Desktop.

Select an option

Save threedaymonk/655649 to your computer and use it in GitHub Desktop.
To deploy via capistrano with rvm on the server, you need something like this in your deploy.rb:
rvm_path = "#{deployment_user_home_directory}/.rvm"
rvm_version = "ruby-1.9.2-p0" # Find this in ~/.rvm/rubies/
set :default_environment, {
"PATH" => %W[
#{rvm_path}/gems/#{rvm_version}/bin
#{rvm_path}/gems/#{rvm_version}@global/bin
#{rvm_path}/rubies/#{rvm_version}/bin
#{rvm_path}/bin
$PATH
].join(":"),
"BUNDLE_PATH" =>
"#{rvm_path}/gems/#{rvm_version}",
"GEM_PATH" => %W[
#{rvm_path}/gems/#{rvm_version}
#{rvm_path}/gems/#{rvm_version}@global
].join(":")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment