Multiple copies of jruby in development environment

I need some help.

I have about 4-5 different jruby on rails projects that I am developing.
At
some point all of these applications need to run (mongrel at present) at
the
same time. I need to have a separate copy and, potentially, version of
jruby for each application as well as a different group of and versions
of
gems for each application.

On the server they run in different user accounts so PATH and JRUBY_HOME
is
distinct for each application.

How can I achieve this so that at runtime each app is using the correct
jruby? Is this about shells etc.

P.S. Operating system is OSX leopard.

Any help appreciated.

Guy

On Thu, Jun 18, 2009 at 10:37 AM, Guy B.
[email protected]wrote:

How can I achieve this so that at runtime each app is using the correct
jruby? Is this about shells etc.

P.S. Operating system is OSX leopard.

Any help appreciated.

Yeah, I can’t think of anything specific that JRuby can do to help you
manage this, it’s probably more about shell environments and keeping an
environment script per app.

Unless there are specific things requiring specific JRuby versions, you
might consider just “vendoring everything” (meaning store copies of all
gems
and dependencies in each app). This would allow you to use a single
JRuby
install to run all the applications.

/Nick

@nick

Thanks,

I couldn’t think of anything either. I’m not going mad. As I said the
deployed apps are OK, its just on my dev machine where I need to mimic
the
server runtime setup.

I wanted reassurance that if the jruby command is run from a full path
and
not via a PATH search, that any thing done by the executable is done in
the
context of the path given to the command and not anything found on the
PATH.

Not knowing enough about jruby internals I suppose I need assurances on
the
following.

Path = /opt/lang/juby1.3.0/bin:/usr…

App 1 starts via /home/gb/dev/app1/lang/jruby1.1.1/bin/jruby
…/app/script/server
App 2 starts via /home/gb/dev/app2/lang/jruby1.1.2/bin/jruby
…/app/script/server
App 3 starts via /home/gb/dev/app3/lang/jruby1.1.3/bin/jruby
…/app/script/server
App 4 starts via /home/gb/dev/app4/lang/jruby1.1.4/bin/jruby
…/app/script/server

Is there a chance that any of the 4 processes might load things from
/opt/lang/jruby1.3.0/bin via the path?

Thanks

Guy

Oh excellent, just the reassurance I needed. I will not set JRUBY_HOME
in
this case.

Thanks for you help.

Guy

On Thu, Jun 18, 2009 at 5:18 PM, Guy B.
[email protected]wrote:

context of the path given to the command and not anything found on the PATH.
The launcher scripts are specifically written to path out to …/lib for
all
JRuby files and Ruby libraries. The only exception is if JRUBY_HOME is
set.
So make sure you unset that variable if necessary, and then you should
be
fine using full paths to the jruby launcher script.

/Nick

Hi Guy,
You can consider using some kind of virtualization, that would give
your apps total separation.
Right now i’m in the process of making 4 test servers out of my 1, and
i’ve choosen to use virtual systems for them.

Best greetings,
Pawel Wielgus

2009/6/19, Guy B. [email protected]:

[email protected]wrote:

I wanted reassurance that if the jruby command is run from a full path
set.
So make sure you unset that variable if necessary, and then you should be
fine using full paths to the jruby launcher script.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Pawel,

As I said before the server environment is fine, this configuration is
for
my dev workstation.

The different apps all need to be running at the same time on my dev box
with different jruby versions and gems in each version.

Thanks Guy

2009/6/19 PaweÅ‚ Wielgus [email protected]