A Rails application is deployed fine via Capistrano (on a gentoo box running Apache front end), a Symlink points to the correct (latest) directory. Only the server keeps using an older directory, restarting Thin does not help. It almost appears as if some caching is going on?
Running the usual Thin server restart for test purposes the next day…
thin restart -s1 -p 3004 -e production
…suddenly DOES indeed use the latest directory. But any new deployment again fails to being used and the scenario starts over again.
# remote directories, via Capistrano
/release…1
/release…2
/release…3 # Server uses this directory, why?
/release…4
/release…5 # symlink 'current' points here
Solved:
I tried to restart Thin from current in the very same shell over and over again. Which embarrassingly means that I stayed in the very same symlinked /current directory to restart. Obviously current in the meantime is actually a new one via Capistrano.
tl;dr
#from current
cd ..
cd current/
Thin restart