If you haven't heard of Foreman, it's a painless way to kickstart an app that depends on running multiple tools or processes. In short, if you are using an app with a lot of stuff that requires to be run like Redis, a rake task, and then the development server, then Foreman is for you. Check it out.
I've been working with increasing number of projects lately and managing environments for each of those has been a time sink. I do maintain a per-project gemset using rvmrc, which does a nice job of isolating gems. But when each of your projects need some environment variables, your bashrc or bash_profile is going to hell.
Well, not actually. I dug up the Foreman docs and found something very useful. If you use Foreman, it supports reading environment variables from a .env file in the project directory. So if your current project uses $GIRLFRIEND_VERSION and $GIRLFRIEND_PATH, just create the following ".env" file in project directory.
And start foreman. Your project can now find your girlfriend's version and path ;)
UPDATE: It is very likely that env variables may be different for your team members. I choose to add .env to my global gitignore file and create a "sample.env" file in the directory, with list of env vars with default values and add it to the repo. Anyone who clones the repo can setup the .env with the values specific to their setup.




