activerecord-jdbc-adapter tests failing when using jruby under rvm -getting “package org.jruby does not exist”

StackOverflow https://stackoverflow.com/questions/7786705

  •  10-02-2021
  •  | 
  •  

Domanda

Anyone knows how to run activerecord-jdbc-adapter tests when using jruby under rvm? Getting "package org.jruby does not exist" - do I need to put the jruby jar on the class path, perhaps?

I added it to CLASSPATH, but no joy - but perhaps JRuby needs it in a different location.

Running on OSX, using rvm, with JRuby 1.6.4, have downloaded activerecord-jdbc-adapter and trying to run tests like this:

rake rails:test DRIVER=mysql

I know I am missing the location of the activerecord source part to the command, but I get the same error with it.

Errors start like this:

javac -target 1.5 -source 1.5  -d pkg/classes -cp "" 
src/java/arjdbc/db2/DB2RubyJdbcConnection.java src/jva/arjdbc/derby/DerbyModule.java 
src/java/arjdbc/h2/H2RubyJdbcConnection.java 
src/java/arjdbc/informix/InformixRubyJdbcConnection.java 
src/java/arjdbc/jdbc/AdapterJavaService.java src/java/arjdbc/jdbc/JdbcConnectionFactory.java 
src/java/arjdbc/jdbc/RubyJdbcConnection.java src/java/arjdbc/jdbc/SQLBlock.java 
src/java/arjdbc/mssql/MssqlRubyJdbcConnection.java src/java/arjdbc/mysql/MySQLModule.java 
src/java/arjdbc/mysql/MySQLRubyJdbcConnection.java 
src/java/arjdbc/oracle/OracleRubyJdbcConnection.java 
src/java/arjdbc/postgresql/PostgresqlRubyJdbcConnection.java 
src/java/arjdbc/sqlite3/Sqlite3RubyJdbcConnection.java

src/java/arjdbc/db2/DB2RubyJdbcConnection.java:28: package org.jruby does not exist
import org.jruby.Ruby;
            ^
src/java/arjdbc/db2/DB2RubyJdbcConnection.java:29: package org.jruby does not exist
import org.jruby.RubyClass;
            ^
...

Thanks in advance, Chris

È stato utile?

Soluzione

Make sure you're running JRuby's rake, then everything should work fine. The default target is the one that runs all the tests.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top