Capistrano binds gems before sending to the server

My servers do not have access to external resources (gems, etc.), so I start manually

bundle package 

then download the code and run

 bundle install --local 

How can I get the same behavior from Capistrano? Using the Bundler recipe, you are trying to install packages on the server. While I would like;

By assembly machine

  • Extract from SVN
  • execute batch package
  • zip and download artifact

On application server

  • Expand Zip Artifact
  • run the package install --local
  • start the server

I tried

 after("deploy:update_code") do system("cd #{copy_cache} && bundle package") end 

But this starts the check and download, there was no room for attachment after the check, but before zip.

+4
source share
1 answer

It seems the best way to do this is to run the package of packages on the development workstation, and then transfer the collected gems to the original control, and then run;

 bundle install --deployment 
+1
source

All Articles