-
-
Save bonkydog/247382 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 :install do | |
run("gem install bundler --source=http://gemcutter.org") | |
end | |
task :symlink_vendor do | |
shared_gems = File.join(shared_path, 'vendor/gems') | |
release_gems = "#{release_path}/vendor/gems" | |
run "mkdir -p #{release_gems}" | |
%w(cache gems specifications).each do |sub_dir| | |
shared_sub_dir = File.join(shared_gems, sub_dir) | |
release_sub_dir = File.join(release_gems, sub_dir) | |
run "mkdir -p #{shared_sub_dir}" | |
run "ln -fs #{shared_sub_dir}/ #{release_sub_dir}" | |
end | |
end | |
# override the engineyard eycap task (which causes problems with how Gemfile is found from vendor/gems/environment.rb) | |
task :bundle_gems do | |
bundler.symlink_vendor | |
run("cd #{release_path} && gem bundle --only #{rails_env}") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment