Forum: JRuby JRoR: Auto-loading of JDBC drivers via RAILS_ROOT/lib

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Wes G. (Guest)
on 2008-12-29 20:32

Just to verify...

If I place the required JDBC drivers for my application in
RAILS_ROOT/lib, will they automatically be placed in the CLASSPATH for
the JRuby runtime when I start my Rails app.?

If so, what line of code actually causes that to happen?

I have some JARs that are deployed as part of a Rails plugin (so they
aren't in RAILS_ROOT/lib, they are in
RAILS_ROOT/vendor/plugins/blah/lib, and I would like to simulate this
autoloading that I understand happens in JRoR.

If I'm mistaken about the ability to autoload JDBC drivers by placing
them in RAILS_ROOT/lib, obviously, I need to know about that.

Many thanks,
Wes G. (Guest)
on 2008-12-29 22:05
Some updates:

1) JAR files placed in RAILS_ROOT/lib will not be auto-require'd into
the Rails application.

2) JAR files placed in JRUBY_HOME/lib will be added to the runtime
CLASSPATH and available to the Rails app.

This topic is locked and can not be replied to.