Mina: Issue on loading an ENV variables in *.yml files

Created on 30 Jan 2015  ·  4Comments  ·  Source: mina-deploy/mina

Mina is not able to load environment variables which are in *.yml files while deploying.
Please refer this for detail: http://stackoverflow.com/questions/28215274/rails-mina-not-able-to-load-environment-variables-in-database-yml-file?noredirect=1#comment44798939_28215274

Most helpful comment

@d4be4st Keeping my exports on top of this line works!

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

Thanks.

All 4 comments

You need to put your ENV in .bashrc file. .bash_profile is not loaded as mina is using non-interactive shell.

seed here: http://stackoverflow.com/a/216204/1339894

@d4be4st i put my ENV variables in .bashrc file. Still same error.

@peterprabu we just had the same problem.
do you have this line in your basrc file?

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

if yes then you need to put your exports before that line

@d4be4st Keeping my exports on top of this line works!

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmuheim picture jmuheim  ·  5Comments

folivi picture folivi  ·  4Comments

Ilya-Kuchaev picture Ilya-Kuchaev  ·  4Comments

syamilmj picture syamilmj  ·  11Comments

thelucid picture thelucid  ·  8Comments