How to avoid "cannot load Java class oracle.jdbc.OracleDriver" in a JRuby Gradle project?
|Added at||2016-12-11 23:12|
When trying to include the Oracle JDBC driver (ojdbc7.jar) in my JRuby Gradle project, I always get a "cannot load Java class oracle.jdbc.OracleDriver" at runtime. Here's my basic build.gradle:
And here's my entrypoint.rb:
Output of build + run steps:
Following the advice in How to use oracle jdbc driver in gradle project, I tried adding this to my build.gradle:
But this causes an error at compile time:
I then tried to add it as a runtime dependency as suggested in How to add OJDBC6.jar in build.gradle file?:
But this again raises a compile error:
So I'm stuck - how can I correctly add odjbc7.jar (or any external jar) as a dependency in my JRuby Gradle project?