[Mongrel] setting enviroment variable

İnanç GÜMÜŞ inanc.gumus at networkistanbul.com
Tue Feb 6 07:20:35 EST 2007


If it's "B", you may use a bash script to do them all at once in there.

On 2/6/07, Luis Lavena <luislavena at gmail.com> wrote:
>
> On 2/6/07, ufuk kocolu <ufuk at pilli.com> wrote:
> >
> > I have a ror project which has been productized. There are several web
> > sites in one ror project
> >
>
> Question:
>
> A) You are serving multiple sites from one rails application?
>
> or
>
> B) You have multiple instances of your rails application, each one
> serving a specific web site.
>
> > I need to set an "enviroment variable" to run different sites, can I do
> > that using mongrel? I tried to use mongrel's -S option and set the
> > enviroment variable in that file but it seems mongrel runs that file
> > after it calls enviroment.rb
>
> The answers will be:
>
> A) Use something like subdomain accounts:
>   http://wiki.rubyonrails.org/rails/pages/HowToUseSubdomainsAsAccountKeys
>   http://www.bigbold.com/snippets/posts/show/1322
>
>
> B) process your ENV information inside environment, and set your
> environment variable prior calling mongrel_rails:
>
>   $ MY_SITE=site1 mongrel_rails start ...
>
>   or
>
>   $ export MY_SITE=site1
>   $ mongrel_rails start ...
>
>
> --
> Luis Lavena
> Multimedia systems
> -
> Leaders are made, they are not born. They are made by hard effort,
> which is the price which all of us must pay to achieve any goal that
> is worthwhile.
> Vince Lombardi
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070206/7e5ca282/attachment.html 


More information about the Mongrel-users mailing list