Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symlink to current is broken #79

Closed
bcasci opened this issue Dec 23, 2012 · 6 comments
Closed

symlink to current is broken #79

bcasci opened this issue Dec 23, 2012 · 6 comments

Comments

@bcasci
Copy link

bcasci commented Dec 23, 2012

Hello.

I'm running into a strange problem that I hope someone can give me a pointer on. The deployment runs fine but the symlink to <deployment_root>/current is wrong. Each deployment creates a broken symlink to a release path beneath current. Logging in to the server and manually running "ln -s <any_release_path> current" instead of ln -nsf will correctly symlink a release path to current.

desc "Deploys the current version to the server."
task :deploy => :environment do
  deploy do
    invoke :'git:clone'
    invoke :'deploy:link_shared_paths'
    invoke :'bundle:install'
    to :launch do  
      queue "touch #{deploy_to}/shared/tmp/restart.txt"
    end
  end
end
$ mina deploy --verbose
# this is what's creating broken symlinks to current 
-----> Updating the current symlink
       $ ln -nfs "$release_path" "current"
# an ls of {deploy_to}/current shows this
$ ls -l /var/www/apps/recording-service/current/
total 0
lrwxrwxrwx 1 deployer deployer 10 Dec 23 09:55 1 -> releases/1
lrwxrwxrwx 1 deployer deployer 10 Dec 23 10:06 2 -> releases/2
@nathanbertram
Copy link
Contributor

Similar issue with a new install on Ubuntu 12.10 x64 ... during initial deploy

-----> Precompiling asset files
       $ RAILS_ENV="production" bundle exec rake assets:precompile RAILS_GROUPS=assets 
       rake aborted!
       File exists - /var/www/someapp/tmp/build-13740049973502/tmp

@edipofederle
Copy link

+1

@JonleePeakman
Copy link

+1
Can you advise exactly how you got around this problem cause I have no idea? Where did you run ls -s current?

@edipofederle
Copy link

@JonleePeakman I just remove deploy directory .... and try again.

@Pbasnal
Copy link

Pbasnal commented Jul 22, 2014

Had same problem...
solved it by removing this line from deploy script in setup task

"queue! %[mkdir -p "#{deploy_to}/current"]"

and then manually delete current folder from server
after that run mina setup and mina deploy

@gabskoro
Copy link
Member

Exactly, current in a smylink that creates automatically, you if you create a folder named current in the setup task please remove it.

@d4be4st d4be4st closed this as completed Jul 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants