Capistrano: Can I set an environment variable for the whole cap session?
I have the exactly same problem, but I think this solution is better: set :default_environment, { ‘env_var1’ => ‘value1’, ‘env_var2’ => ‘value2’ } This works for me like a charm.