Deployment: symlink on capistrano points to the "current" directory on the previous release

I use capistrano to deploy my Ruby on Rails project. I am on Dreamhost VPS and since a few weeks ago, without any changes to the capistrano or the passenger, I had a strange deployment problem:

Every time capistrano deploys my application, everything goes right except deploy: symlink (which is called by default), which should point the "current" directory to the latest version. Despite the fact that the new version is correctly placed in the "releases" directory, the problem is that the "current" symbolic link is always installed on the previous version instead of the new one. Therefore, I can deploy the applications, but I always need to run the deployment twice in a row.

You can see the capistrano magazine here: http://img715.imageshack.us/img715/7803/capistranoproblemb.png

Has anyone else experienced this before or can help me solve it?

Thank!

+5
source share
2

, , (release_path last_path - ).


namespace :deploy do
  desc "Recreate symlink"
  task :resymlink, :roles => :app do
    run "rm -f #{current_path} && ln -s #{release_path} #{current_path}"
  end
end

after "deploy:create_symlink", "deploy:resymlink", "deploy:update_crontab"
+6

, @foresth .

, , capistrano.

: latest_release deploy .

+6

All Articles