During the deployment of the Rails3 application in capistrano, I want my server to set stones using Gemfile.lock every time I deploy. And since my server doesnβt have rvm and thatβs all .. All gems should be installed as system gems.
To install system stones, we need to sudo gem install anygem or for bunder, we need to give the sudo bundle install command inside our current directory of the capistrano deployment structure.
Each time I deploy, my deployment is broken down into the stone installation process. I need sudo bundle install to run. For this I need a deployment hook for capistrano. The pre-made ones, which are delivered by the packer airplane itself, do not work for me. My confusion boils down to these three questions.
When do I need to call the sudo bundle install command during the deployment process - I mean, after what is the capistrano task?
To run sudo commands using capistrano, what declarations should I specify in the cap file? Note. I have already included my public key as authorized keys on my server.
How should the package installation hook be set in the cap file?
Please, help.
Anand source share