【发布时间】:2014-03-20 16:22:38
【问题描述】:
我使用 capistrano 3、rvm 和 bundler 进行部署。
瘦服务器重启如下:
within release_path do
execute :bundle, :exec, "thin restart -O -C config/thin/staging.yml"
end
这个工作正常并生成这个命令:
cd /var/www/foo/releases/20140320154611 && ~/.rvm/bin/rvm ruby-2.0.0-p353@foo do bundle exec thin restart -O -C config/thin/staging.yml
现在我需要使用这个设置RUBY_GC_MALLOC_LIMIT=90000000重新启动瘦身,我不知道如何在execute命令中进行设置?
脚本必须设置 rvm 以了解捆绑包,并设置 RUBY_GC_MALLOC_LIMIT 用于瘦
不工作:
-
因为 rvm 没有设置(执行 :bundle # 设置一个 rvm 钩子)
执行 "RUBY_GC_MALLOC_LIMIT=90000000", :bundle, :exec, "thin restart -O -C config/thin/staging.yml"
2.这里也一样
execute "RUBY_GC_MALLOC_LIMIT=90000000 bundle exec thin restart -O -C config/thin/staging.yml"
【问题讨论】:
标签: bundler thin capistrano3 rvm-capistrano sshkit