在 rvm 下使用 jruby 时,activerecord-jdbc-adapter 测试失败 - 获取“包 org.jruby 不存在”
有人知道在rvm下使用jruby时如何运行activerecord-jdbc-adapter测试吗?获取“package org.jruby 不存在” - 我是否需要将 jruby jar 放在类路径上?
我将它添加到 CLASSPATH 中,但没有高兴 - 但也许 JRuby 需要它在不同的位置。
在 OSX 上运行,使用 rvm,使用 JRuby 1.6.4,已下载 activerecord-jdbc-adapter 并尝试运行如下测试:
rake rails:test DRIVER=mysql
我知道我缺少命令的 activerecord 源部分的位置,但我收到相同的错误与它。
错误是这样开始的:
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;
^
...
提前致谢,克里斯
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您正在运行 JRuby 的 rake,然后一切都会正常工作。默认目标是运行所有测试的目标。
Make sure you're running JRuby's rake, then everything should work fine. The default target is the one that runs all the tests.