I use capistrano 3, rvm und bundler for my deployment.
The thin server are restarted like this:
within release_path do
execute :bundle, :exec, "thin restart -O -C config/thin/staging.yml"
end
This work fine and generate this command:
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
Now I need to restart the thin's with this setting RUBY_GC_MALLOC_LIMIT=90000000 and I dont know how to set this up in the execute command?
The script has to setup rvm for knowing bundle, and RUBY_GC_MALLOC_LIMIT for thin
Not working:
Because rvm is not set (execute :bundle # set a rvm hook)
execute "RUBY_GC_MALLOC_LIMIT=90000000", :bundle, :exec, "thin restart -O -C config/thin/staging.yml"
2.same here
execute "RUBY_GC_MALLOC_LIMIT=90000000 bundle exec thin restart -O -C config/thin/staging.yml"
I have found a solution....
execute :bundle, :exec, "'RUBY_GC_MALLOC_LIMIT=90000000 thin restart -O -C config/thin/staging.yml'"