That would explain why it was working for me...the first thing I run
in my JRuby command prompt sessions is a script that primes JRUBY_HOME
to the project I'm working on.

To be honest, it would seem the most logical way to avoid this would
be to NOT require jruby.home be set to anything during normal
execution; it should be used only in the startup scripts to set up
paths and classpaths, in my opinion, and this is perfectly in line
with how other languages do things. You wanna load a file, you're
golden as long as it's in your classpath (or you specify a valid
filesystem path). I think that behavior would solve all issues.

It would seem to make sense, too, since everything necessary to run
JRuby should be in the classpath, added to the classpath by the exec
script, or in the JRuby jar. I can think of no reason why jruby.home
should be a requirement after startup.

- Charlie

On 1/22/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote:
>   I was trying to get 'require "erb"' to work within a ruby script
> loaded from a Servlet.  I came to the realization that because
> the system property jruby.home was not set, we were not defining
> any of our usual path directories for finding modules.
>
>   This patch just makes jruby.home a '.' if it is not set.  This
> makes all the paths get set up so that require erb works etc...
> Is this a good idea though?  Anyone have thoughts?  One reason
> I ran into this is BSF does not require that jruby.home be set.
> Of course I could manually set it to '.', but then anyone using
> BSF would have to basically do this everytime.  People who try
> and embed directly will have to do something like this too.
>
>   My other thought is perhaps we should treat jarPaths as only
> a special concept?  Actually perhaps that "jar:" processing in
> findFile is meant for this purpose?
>
> -Tom
>
> --
> + http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
> | Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
> |                              |  mind." -Louis Pasteur       |
>
>
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to