This problem is killing me and I feel like I tried everything.
First, a problem arose when upgrading to Capistrano 3. Capistrano now uses / usr / bin / env before each command when deploying to make sure the environment setting is correct.
When Capistrano is sent to create symbolic links to the necessary shared directory and related files, it tries to execute commands like:
/usr/bin/env ln -s /full/path /different/full/path
... and then it throws errors:
/usr/bin/env: ln: Too many levels of symbolic links
I understand that this is not a Capistrano error, so I started troubleshooting with ssh'ing on my server and trying the same command and I get the same error (which is at least good for consistency). Then I try to execute the same command without / usr / bin / env:
ln -s /full/path /different/full/path
And it works !!!! Maybe you see a real solution that I canβt?
only the / usr / bin / env command is output here:
rvm_bin_path=/home/deployer/.rvm/bin GEM_HOME=/home/deployer/.rvm/gems/ruby-1.9.3-p392 TERM=xterm-256color SHELL=/bin/bash IRBRC=/home/deployer/.rvm/rubies/ruby-1.9.3-p392/.irbrc SSH_CLIENT=... OLDPWD=/home/deployer/Sites/example.com MY_RUBY_HOME=/home/deployer/.rvm/rubies/ruby-1.9.3-p392 SSH_TTY=/dev/pts/0 USER=deployer LS_COLORS= ..... _system_type=Linux rvm_path=/home/deployer/.rvm SSH_AUTH_SOCK=.... rvm_prefix=/home/deployer MAIL=/var/mail/deployer PATH=/home/deployer/.rvm/gems/ruby-1.9.3-p392/bin:/home/deployer/.rvm/gems/ ruby-1.9.3-p392@global /bin:/home/deployer/.rvm/rubies/ruby-1.9.3-p392/bin:/home/deployer/.rvm/bin:/opt/rubyee/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/deployer/.rvm/bin PWD=/home/deployer/Sites LANG=en_US.UTF-8 _system_arch=i386 _system_version=12.04 rvm_version=1.26.4 (latest) SHLVL=1 HOME=/home/deployer LOGNAME=deployer GEM_PATH=/home/deployer/.rvm/gems/ruby-1.9.3-p392:/home/deployer/.rvm/gems/ ruby-1.9.3-p392@global SSH_CONNECTION=.... LESSOPEN=| /usr/bin/lesspipe %s LESSCLOSE=/usr/bin/lesspipe %s %s RUBY_VERSION=ruby-1.9.3-p392 _system_name=Ubuntu _=/usr/bin/env
I also tried commands like the following to find potential link loops:
find . -maxdepth 20 -type l -exec ls -ld {} +
But does not give the correct results:
lrwxrwxrwx 1 deployer deployer ...
source share