Reputation: 83981
My servers don't have access to external resources (gems, etc), so I manually run
bundle package
then upload the code and run
bundle install --local
How can I get the same behaviour out of Capistrano? Using the Bundler recipe, tries to install the bundles on the server. Whereas I'd like to;
On the build machine
On the application server
I tried
after("deploy:update_code") do
system("cd #{copy_cache} && bundle package")
end
But that runs the checkout and upload, there didn't seem to be a place to attach after the checkout, but before the zip.
Upvotes: 4
Views: 755
Reputation: 83981
It seems the best way to do this is to, run bundle package on the development workstation, and then commit the bundled gems to source control, then run;
bundle install --deployment
Upvotes: 1