Forum: JRuby RE: Re: How to properly setup requires

Posted by Eric Christopherson (echristopherson)
on 2012-06-30 04:24
(Received via mailing list)
On Jun 29, 2012 4:05 PM, "D M" <vilanye@live.com> wrote:
>
> The exact problem is why do I have to explicitly set $LOAD_PATH to only
recognize the path of the application? I don't recall ever having to do
that in ruby/jruby before and I have never had to do that in any other
language.
>
> Why does JRuby not know what the path is to the currently executing .rb
file.
>
> given main.rb(which lives in lib) and http_proxy/http.rb why cant JRuby
require http.rb with a simple require 'http_proxy/http' in main.rb 
without
all the ridiculous $LOAD_PATH contortions?

It sounds like you've started using 1.9 compatibility mode -- either
through the --1.9 option or .jrubyrc or just using JRuby 1.7.0preview1,
which enables it by default.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.