-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jruby 1.7.20 and ruby 1.9 mode. #2912
Comments
yes, jruby-1.7.x defaults to 1.9 via commandline you can use the switch '--1.8' or use a .jrubyrc file: see or use -Djruby.compat.version=1.8 or set this system properties on the java |
I didn't get that properly. |
either you are using some ruby scripting then before you get the
ScriptingContainer or ScriptEngine you can set the system properties I
mentioned.
if you tell my how the Hbase shall makes use of JRuby then it is easier to
tell how to use 1.8 mode.
|
For Hbase shell. it has the below script
For the hbase (maven) testcase "TestShell" |
replace this line from your script since from the error it looks like the 1.9 feature not to find files on current working directory unless this directory is on the LOAD_PATH |
I think i didn't convey clearly about the hbase shell problem and hbase testcase issue. Both got mixed up here. But the root cause is same (Jruby is used in 1.9 mode) 1) Shell problemThe script loads the hbase shell when invoked. [ayappan@soe07-vm3 bin]$ ./hbase shell contents of /home/ayappan/hbase/bin/../hbase-shell/src/main/ruby/shell/formatter.rb 2)Testcase issueHbase has this testcase code. package org.apache.hadoop.hbase.client; import java.io.IOException; import org.apache.hadoop.hbase.testclassification.ClientTests; @category({ ClientTests.class, LargeTests.class }) @test } |
Your 1) issue above doesn't look like a 1.8/1.9 problem. It's failing to find a method in jline's Terminal class. This method does not exist on the Terminal in the jline that JRuby 1.7.20 ships, at least. I guess you are attempting to update hbase? You will need to figure out an alternative to this call. The 2) issue could be a 1.8/1.9 issue if the file in question is in CWD. Normally 1.9 mode will not look in CWD unless it is explicitly added to the load path, using -I. as @mkristian suggested above. You can also force JRuby to use 1.8 mode throughout a given JVM by setting property I'm not seeing a JRuby issue yet :-) |
Oh, I would also suggest that the hbase update just use 1.9 mode and deal with the (mostly minor) issues that will result. 1.8 mode is completely gone in JRuby 9000, and 1.8.7 has been EOL in the Ruby world for years. |
closing since its a JRuby 1.7.x (EOL) report against its (non preferred) |
Hbase shell makes use of Jruby 1.6.8 which works in ruby 1.8 mode. If jruby is updated to 1.7.20 version, hbase shell and its related testcases fails since the newer version works in ruby 1.9 mode. Is there a way to set the jruby-complete.17.20 jar file in ruby 1.8 mode?
The text was updated successfully, but these errors were encountered: