Last Updated: February 25, 2016
·
977
· dlikhten

Get Pow and Foreman to use the same configuration

It would be nice to have rails run with pow and forman reading the same configuration.

first I would alias rails commands for foreman execute...

In .bash_profile

alias rails='foreman run rails'

In your .env set whatever you like in foreman's format:

FOO=bar

In your repository's .powenv. This will export everything in your .env file and exclude comments.

export $(cat .env | grep -v "#")

One note: Don't put quotes around things in your .env file because FOO="bar" becomes export FOO="\"bar\""

And you are set.