Capistrano 3 process error

I am upgrading from Capistrano 2 to Capistrano 3, and everything is working successfully, except that I see that these 2 crash on startup:

DEBUG [bbfe01ec] Running /usr/bin/env [ -L /var/www/myapp/releases/20140211033611/public/assets ] on myapp.com
DEBUG [bbfe01ec] Command: [ -L /var/www/myapp/releases/20140211033611/public/assets ]
DEBUG [bbfe01ec] Finished in 0.146 seconds with exit status 1 (failed).
DEBUG [26f99b11] Running /usr/bin/env [ -d /var/www/myapp/releases/20140211033611/public/assets ] on myapp.com
DEBUG [26f99b11] Command: [ -d /var/www/myapp/releases/20140211033611/public/assets ]
DEBUG [26f99b11] Finished in 0.141 seconds with exit status 1 (failed).

Why are these crashes and how can I fix them?

+3
source share
1 answer

I have the same problem and here is the capistrano code that implements when you get these errors:

desc 'Symlink linked directories'
  task :linked_dirs do
    next unless any? :linked_dirs
    on release_roles :all do
      execute :mkdir, '-pv', linked_dir_parents(release_path)

      fetch(:linked_dirs).each do |dir|
        target = release_path.join(dir)
        source = shared_path.join(dir)
        unless test "[ -L #{target} ]"
          if test "[ -d #{target} ]"
            execute :rm, '-rf', target
          end
          execute :ln, '-s', source, target
        end
      end
    end
  end

As I understand it, the ln command is used here to create symbolic links.

In the reading guide on ln (man ln), we understand that the command will probably fail due to system limitations when trying to create hard link directories.

-d, -F, --directory
  allow the superuser to attempt to hard link directories (note: will probably fail 
  due to system restrictions, even for the superuser)

'ln -d' 'ln -s', ( ).

, . , :

set :format, :pretty
set :log_level, :info
+2

All Articles