Search code examples
ruby-on-railsresquegod

Use ENV variables in god config file


I want to use environement varible in my god config file. I am using

queue       = ENV['ENCODE_QUEUE'] || "encoding_abc"

and setting ENCODE_QUEUE using

export ENCODE_QUEUE="enocding_xyz" in ~/.bashrc file. but the god service always uses 'encoding_abc" How do i do this?


Solution

  • Is it possible your god service is not loading the ~/.bashrc file?

    If god is running from a non-interactive shell, you will need to put the export in ~/.bash_profile instead. Also make sure it is running as your user.