【问题标题】:How to set RUBY_GC_MALLOC_LIMIT with capistrano 3 on thin restart?如何在精简重启时使用 capistrano 3 设置 RUBY_GC_MALLOC_LIMIT?
【发布时间】: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 用于瘦

不工作:

  1. 因为 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


    【解决方案1】:

    我找到了解决办法....

    execute :bundle, :exec, "'RUBY_GC_MALLOC_LIMIT=90000000 thin restart -O -C config/thin/staging.yml'"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-22
      • 1970-01-01
      • 2014-01-27
      • 1970-01-01
      • 1970-01-01
      • 2017-03-19
      • 1970-01-01
      相关资源
      最近更新 更多