Custom Gem Directory with Embedded-ish JRuby

I’m calling into JRuby as part of my build via org.jruby.Main — is there
a way I can specify GEM_HOME (an environment variable) when I do
something like this? Modifying the user’s environment variables is out:
I need to do this from within my build script.

Specifically, I’m looking to install gems into a “build” directory and
then use them in subsequent executions. I was installing the gems with
-i, but then it wasn’t clear to me how to tell later JRuby runs to use
that directory like a GEM_PATH directory in later runs.

Any tips?

~~ Robert.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

it depends on the build script. is it bash or so:

GEM_HOME=/home/kristian/.m2/rubygems GEM_PATH=$GEM_HOME java -jar
jruby-complete.jar …

should do the trick without changes the user’s environment.

regards
Kristian

On Sat, Nov 28, 2009 at 8:09 PM, Robert Fischer
[email protected] wrote:

Any tips?

~~ Robert.


To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email


Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

         _=_
       q(-_-)p
        '_) (_`
        /__/  \
     _(<_   / )_
  (__\_\_|_/__)

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

The build script is running within the JVM (specifically, it’s Gradle).
That’s the trick.

Sorry, should have been clearer about that.

~~ Robert.

kristian wrote:

On Sat, Nov 28, 2009 at 8:09 PM, Robert Fischer

directory like a GEM_PATH directory in later runs.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email