[Mongrel] Passing environment to mongrel apps
ufuk kocolu
ufuk at pilli.com
Tue Apr 24 07:30:11 EDT 2007
I needed the same thing, if you are on linux just use
export ENV_NAME=value; mongrel_rails start
Pete DeLaurentis wrote:
> Hi guys,
>
> I'm looking for a way to pass environment variables to my Rails app
> via Mongrel. I want to conditionally execute code in environment.rb
> based on these environment variables.
>
> Background:
>
> 1. I have some special stuff I want to do when my Rails app first starts
> 2. So, stuff it in environment.rb in after_initialize, right?
> 3. Not this time. I have several other background processes that
> include environment.rb, but shouldn't run this code.
>
> Some other background:
>
> I'm using lighttpd, mongrel, and mongrel_cluster
>
> If there's not a way to do this, I can fallback on having all the
> background processes set an environment variable, but this doesn't
> seem as clean.
>
> Thanks for the help!
> Pete
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
>
More information about the Mongrel-users
mailing list