Changed default bundle_path from a relative path to absolute. #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because Capistrano cleans up old releases,
the default
bundle_path
('vendor/bundle'
) causes problems withlong-running tasks, e.g. unicorn.
In unicorn the master process spawns new child processes to reload the
application, typically as part of a new
cap foo deploy
.To do this it has to find the
unicorn
binary again.The problem is that if you initially start the unicorn master process
with a cwd of
/var/www/foo/releases/12345
plus a
bundle_path
ofvendor/bundle
,then the path to the
unicorn
binary won't exist a few deploys later,and unicorn will fail to start new workers.
But with a cwd of
/var/www/foo/releases/12345
plus a
bundle_path
of/var/www/foo/shared/vendor/bundle
,the
unicorn
binary's path is all permanent elements,so reloading will work indefinitely.