Created
November 8, 2010 08:48
-
-
Save baldowl/667489 to your computer and use it in GitHub Desktop.
Using Chef and Bundler Together
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
# Drop it in config/deploy/ | |
# | |
# It's evaluated inside the deploy resource's context. | |
# | |
# It assumes Gemfile and Gemfile.lock are present and satisfy Bundler's | |
# requirements for the --deployment option. | |
current_release_directory = release_path | |
running_deploy_user = new_resource.user | |
bundler_depot = new_resource.shared_path + '/bundle' | |
excluded_groups = %w(development test) | |
script 'Bundling the gems' do | |
interpreter 'bash' | |
cwd current_release_directory | |
user running_deploy_user | |
code <<-EOS | |
bundle install --quiet --deployment --path #{bundler_depot} \ | |
--without #{excluded_groups.join(' ')} | |
EOS | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment