It should be #{latest_release} not #{release_path} release_path only works during a deploy; latest_release will work all the time.
See: https://github.com/capistrano/capistrano/blob/master/lib/capistrano/recipes/deploy.rb Have you ensured that all the targets in shared exist before attempting to create the symlinks? What isn't working about it? Are you invoking 'cap deploy:shared_symlinks' then see my suggestion above. Is the cap task raising an error; post a copy of a failed run. Is the task executing but you just don't end up with the symlinks? Are there files pre-existing in the release directory from checkout; you need to remove them in order to recreate them as symlinks. On Jan 29, 2013, at 3:30 AM, bsod99 <nicky.cramp...@gmail.com> wrote: > Alas, this still isn't correct - symlinking definitely a bit messed up, Can > anyone see what is wrong with this staging.rb script? > http://pastie.org/5927281 > I must still have the order wrong...thanks for any help > > > On Thursday, 24 January 2013 09:47:59 UTC, bsod99 wrote: > Thanks for all the replies. I followed dbray's advice and kept releases at, > and adjusted sequencing to: > > after "deploy:update", "deploy:symlink_shared" > after "deploy:restart", "deploy:cleanup" > > This seems to be working fine (and makes sense, having thought through more > carefully about what each is doing) > > On Thursday, 24 January 2013 02:42:51 UTC, dbray wrote: > Keep releases should be 2 at minimum in my opinion > > On Jan 23, 2013, at 9:26 AM, bsod99 <nicky.c...@gmail.com> wrote: > >> I followed the advice in another post about how to clean up old capistrano >> releases, however, i've realised that the way I've implemented this has >> messed up the paths in my application (just on a staging site thankfully!). >> I am using the code below in my config/deploy/staging.rb script, but it >> can't be running at the correct point, as after deployment I end up with >> application failing as it's trying to load classes from earlier releases. If >> I remove the keep_releases line and the one below, and redeploy, everything >> works again. Has anyone come across this issue? >> >> set :use_sudo, false >> set :keep_releases, 1 >> after "deploy:update", "deploy:cleanup" >> >> namespace :deploy do >> task :symlink_shared do >> // run some commands i need >> end >> end >> >> before "deploy:restart", "deploy:symlink_shared" >> -- >> * You received this message because you are subscribed to the Google Groups >> "Capistrano" group. >> * To post to this group, send email to capis...@googlegroups.com >> * To unsubscribe from this group, send email to >> capistrano+...@googlegroups.com For more options, visit this group at >> http://groups.google.com/group/capistrano?hl=en > > -- > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to capistrano@googlegroups.com > * To unsubscribe from this group, send email to > capistrano+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/capistrano?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to capistrano+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en --- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.