# Is there a way to set a global variable in my deploy

**URL:** <https://www.ruby-forum.com/t/is-there-a-way-to-set-a-global-variable-in-my-deploy/130145>\
**Category:** Deployment\
**Created:** [February 25, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-set-a-global-variable-in-my-deploy/130145 "2008-02-25T20:19:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/6a8cbe/32.png) [@lucasc](https://www.ruby-forum.com/u/lucasc)\
**Post date:** [February 25, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-set-a-global-variable-in-my-deploy/130145/1 "2008-02-25T20:19:32Z")

</div>

I am deploying an application to several sub domains and need to set a  
global variable in each sub domain so that I query the correct table  
based on the sub domain. Currently I am doing this in my layouts but  
this doesn’t seem like a good practice.

Does anyone know of a way to set this global variable when I deploy  
using capistrano?
