public
Last active

  • Download Gist
bundler_rc1_capistrano.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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

You need to change --disable-shared-gems to --production if you have bunder.rc2

thanks, just updated it

Now, apparently to --deployment rather than --production.

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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.