Created
July 28, 2010 06:33
-
-
Save ctrochalakis/493586 to your computer and use it in GitHub Desktop.
Bundler rc capistrano recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bundler-rc deploy recipe | |
namespace :bundler do | |
task :create_symlink, :roles => :app do | |
shared_dir = File.join(shared_path, 'bundle') | |
release_dir = File.join(current_release, '.bundle') | |
run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{release_dir}") | |
end | |
desc "Install gem bundle if needed" | |
task :install, :roles => :app do | |
bundler.create_symlink | |
bundle_path ="#{shared_path}/bundler" | |
run "cd #{release_path} && ( bundle check || bundle install #{bundle_path} --disable-shared-gems )" | |
end | |
end | |
after 'deploy:update_code', 'bundler:install' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment