Created
July 28, 2010 03:46
-
-
Save mateomurphy/493313 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
namespace :bundler do | |
task :create_symlink, :roles => :app do | |
shared_dir = File.join(shared_path, 'bundled_gems') | |
release_dir = File.join(current_release, 'vendor', 'bundle') | |
run("mkdir -p #{shared_dir} && ln -s #{shared_dir} #{release_dir}") | |
end | |
task :bundle_new_release, :roles => :app do | |
bundler.create_symlink | |
run "cd #{release_path} && bundle install --deployment" | |
end | |
end | |
after "deploy:update_code" do | |
bundler.bundle_new_release | |
end |
thanks, just updated it
Now, apparently to --deployment rather than --production.
Updated for rc2
rc 4 now has this built in.
Just add "require 'bundler/capistrano'" in your Capistrano deploy file (deploy.rb).
http://github.com/carlhuda/bundler/blob/master/lib/bundler/capistrano.rb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to change --disable-shared-gems to --production if you have bunder.rc2