Shared_children not working in Capistrano 3

I have the following in deploy.rb :

 set :upload_dirs, %w(public/pictures) set :shared_children, (fetch(:shared_children) || []) + fetch(:upload_dirs) 

This seems to be the proposed method, allowing me to have a common shared directory.

The public/pictures directory exists and is checked empty in the repository. I also tried not to have it in the repository, but it still doesn't work.

When I deploy using capistrano, I do not see the public/pictures directory that appears anywhere in my deployment location.

Has this feature been removed from Capistrano 3? Is there a definitive source of documentation for Capistrano 3? All I can find is the Capistrano 2 documentation and very rare sources of information for v3.

+6
source share
1 answer

This seems to be an undocumented change from Capistrano 2 to 3. In the new version, the name seems to be :linked_dirs .

I updated my code as such:

 set :linked_files, %w(config/database.yml config/application.yml) set :linked_dirs, %w(public/pictures) 

I also took the opportunity to use a new function :linked_files , which allows you to link files found in the shared directory directly in the current application without creating custom tasks for it.

Both variables look like nil at first, so you don't need to retrieve the current value to add your own directories to them.

+18
source

All Articles