dev@glassfish.java.net

Re: Question about glassfish_rails gem

From: . <gmoniey_at_gmail.com>
Date: Fri, 8 Aug 2008 18:12:20 -0700

Hi Arun,

Thanks for getting back to me. I understand that rails is single threaded,
and that the -n spawns multiple instances, but where it is a bit cloudy is
how the pool is handled. Is this done with glassfish? If so, then why are
the other rails instances accessible through the browser.

For example, when I loaded the glassfish_rails with -n=4, I noticed that
rails apps were deployed on port 3000 (which is expected), and 3838 (as well
as some others I missed). Shouldn't the app only be accessible from 3000? Or
is this supposed to be handled by some load balancer?

Thanks.

On Fri, Aug 8, 2008 at 4:18 PM, Arun Gupta <Arun.Gupta_at_sun.com> wrote:

> Hi arash,
>
> Rails is single threaded. The -n option allows multiple Rails requests to
> be handled concurrently by spawning as many Rails runtime and keeping them
> in the pool.
>
> Specifying RAILS_ENV from CLI is a missing feature tracked at:
>
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=4156
>
> You can see several usages of Gem at:
>
> http://blogs.sun.com/arungupta/tags/rubyonrails+gem
>
> Thanks,
> -Arun
>
>
> . wrote:
>
>> I'm a bit confused about the -n parameter...It seems that this launches 4
>> separate rails instances, I'm guessing this is used for load balancing?
>>
>> Which brings me to my next question, how can I specify that I want to
>> deploy to a production environment? (i.e. have the logs updated rather than
>> printing everything to the console). Currently it seems like things run
>> pretty slow, and my guess is because the environment is set to dev (although
>> I may be way off).
>>
>> Could someone shed some light on the different usages of the gem? thanks
>>
>> arash
>>
>
> --
> Application Platform, Sun Microsystems, Inc.
> Blog: http://blogs.sun.com/arungupta
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>