为什么不使用此当前目录?

时间:2012-05-09 09:59:55

标签: ruby-on-rails apache capistrano symlink thin

通过Capistrano(在运行 Apache前端的gentoo盒子上)部署Rails应用程序,Symlink指向正确的(最新)目录。只有服务器继续使用旧目录,重新启动Thin无济于事。几乎看起来好像有些缓存正在进行?

第二天运行通常的瘦服务器重启以进行测试......

thin restart -s1 -p 3004 -e production

...突然确实使用了最新的目录。但是,任何新部署都无法再次使用,并且场景重新开始。

# remote directories, via Capistrano
/release…1
/release…2
/release…3 # Server uses this directory, why?
/release…4
/release…5 # symlink 'current' points here

解决:

我试图一遍又一遍地在同一个shell中从当前重启Thin。这令人尴尬地意味着我停留在同一个符号链接/当前目录中以重新启动。显然,同时通过Capistrano实际上是新的。

TL;博士

#from current
cd ..
cd current/
Thin restart

1 个答案:

答案 0 :(得分:0)

你的capistrano配方是否重启了服务器?