Skip to content

Instantly share code, notes, and snippets.

@brettbuddin
Created February 22, 2011 20:39
Show Gist options
  • Save brettbuddin/839344 to your computer and use it in GitHub Desktop.
Save brettbuddin/839344 to your computer and use it in GitHub Desktop.
namespace :bundler do
task :create_symlink, :roles => :app do
shared_dir = File.join(shared_path, 'bundle')
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 --production"
end
end
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
default_environment['PATH'] = "/opt/ruby-enterprise-1.8.7-2010.02/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment