Skip to content

Instantly share code, notes, and snippets.

@tanitanin
Created October 10, 2013 12:42
Show Gist options
  • Save tanitanin/6917715 to your computer and use it in GitHub Desktop.
Save tanitanin/6917715 to your computer and use it in GitHub Desktop.
Capistrano v3でcapistrano/rvmがまだinstall/gemset createを実装してなかったので自分用に書いたメモ
# lib/capistrano/rvm.cap
namespace :rvm do
desc 'RVM install in :rvm_type or :rvm_custom_path'
task :install do |host|
on roles(:app) do
rvm_path = '~/.rvm'
#rvm_path = '/usr/local/rvm' if :rvm_type == :system
#rvm_path = :rvm_custom_path if :rvm_custom_path
rvm_dir = File.dirname(rvm_path)
execute "mkdir -p #{rvm_path} && cd #{rvm_dir} && curl -L https://get.rvm.io | bash"
end
end
# Gemset
namespace :gemset do
desc 'Cannot create yet'
task :create do
on roles(:app) do
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment