Forum: JRuby JRuby Head Broken?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
486ca04f06d968004643ce5b47376ded?d=identicon&s=25 Keith B. (keith_b)
on 2015-02-24 20:33
(Received via mailing list)
Hi, all...I'm helping with the 'dnsruby' gem (
https://github.com/alexdalitz/dnsruby), and have been making sure it
runs
on JRuby.

We recently got a Travis CI error running the tests on JRuby head.
Should
we not be including JRuby head in the versions to test with Travis CI?

The page showing the error is at:

https://travis-ci.org/alexdalitz/dnsruby/jobs/51427488

I installed jruby-head using rvm, and whenever I run irb and input
anything, it says:

➜  ~  irb
 :001 >
 :002 >   puts 'hello'
hello
NoMethodError: undefined method `CurrentContext' for
#<Class:0x5b2b8d86>::IRB
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb/workspace.rb:85:in
`evaluate'
    from org/jruby/RubyKernel.java:990:in `eval'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb/workspace.rb:86:in
`evaluate'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb/context.rb:263:in
`set_last_value'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb/context.rb:379:in
`evaluate'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb.rb:489:in
`eval_input'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb.rb:623:in
`signal_status'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb.rb:486:in
`eval_input'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb/ruby-lex.rb:245:in
`each_top_level_statement'
    from org/jruby/RubyKernel.java:1310:in `loop'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb/ruby-lex.rb:231:in
`each_top_level_statement'
    from org/jruby/RubyKernel.java:1120:in `catch'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb/ruby-lex.rb:230:in
`each_top_level_statement'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb.rb:485:in
`eval_input'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb.rb:395:in
`start'
    from org/jruby/RubyKernel.java:1120:in `catch'
    from
/Users/kbennett/.rvm/rubies/jruby-head/lib/ruby/stdlib/irb.rb:394:in
`start'
    from /Users/kbennett/.rvm/rubies/jruby-head/bin/irb:13:in
`__script__'Maybe IRB bug!

I suspect I should be ignoring jruby-head, expecting it to sometimes be
unstable.  Is that the answer?

Thanks,
Keith
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2015-02-24 20:47
(Received via mailing list)
This is something I am working on atm.  In mixed mode we have a race
which
does not seem to affect any tests we run but I can see it in some more
complicated scenarios.  I am trying to get this back this afternoon to
being solid.

-Tom

On Tue, Feb 24, 2015 at 1:28 PM, Keith Bennett <keithrbennett@gmail.com>
486ca04f06d968004643ce5b47376ded?d=identicon&s=25 Keith B. (keith_b)
on 2015-02-26 17:24
(Received via mailing list)
Tom -

This isn't a big deal for dnsruby, but I mention it in case it would be
helpful to you in your troubleshooting...

I just rvm reinstalled jruby-head, and still get an error when running
the
tests, but it's a different error.  No error occurs when using
jruby-1.7.18.  You could reproduce it yourself by git cloning
git@github.com:alexdalitz/dnsruby.git, running 'bundle', and then 'rake
test'. Here's the output:


/Users/kbennett/.rvm/rubies/jruby-head/bin/jruby -I"lib"
-I"/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib"
"/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib/rake/rake_test_loader.rb"
"test/ts_dnsruby.rb"
LoadError: load error: dnsruby/resource/NXT --
java.lang.ClassCastException: org.jruby.RubyNil cannot be cast to
org.jruby.parser.StaticScope

require at org/jruby/RubyKernel.java:954

(root) at
/Users/kbennett/work/dnsruby/lib/dnsruby/resource/generic.rb:167

require at org/jruby/RubyKernel.java:954

(root) at
/Users/kbennett/work/dnsruby/lib/dnsruby/resource/resource.rb:1

require at org/jruby/RubyKernel.java:954

(root) at
/Users/kbennett/work/dnsruby/lib/dnsruby/resource/resource.rb:24

require at org/jruby/RubyKernel.java:954

(root) at /Users/kbennett/work/dnsruby/lib/dnsruby/message/message.rb:1

require at org/jruby/RubyKernel.java:954

(root) at /Users/kbennett/work/dnsruby/lib/dnsruby/message/message.rb:18

require at org/jruby/RubyKernel.java:954

(root) at /Users/kbennett/work/dnsruby/lib/dnsruby.rb:1

(root) at /Users/kbennett/work/dnsruby/lib/dnsruby.rb:17

require at org/jruby/RubyKernel.java:954

(root) at /Users/kbennett/work/dnsruby/test/spec_helper.rb:1

(root) at /Users/kbennett/work/dnsruby/test/spec_helper.rb:17

require at org/jruby/RubyKernel.java:954

/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib/rake/rake_test_loader.rb_CLOSURE_1__/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib/rake/rake_test_loader.rb_0
at
/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:15

select at org/jruby/RubyArray.java:2360

__script__ at
/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4
rake aborted!
Command failed with status (1): [ruby -I"lib"
-I"/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib"
"/Users/kbennett/.rvm/gems/jruby-head/gems/rake-10.3.2/lib/rake/rake_test_loader.rb"
"test/ts_dnsruby.rb" ]
/Users/kbennett/.rvm/gems/jruby-head/bin/jruby_executable_hooks:15:in
`__script__'
Tasks: TOP => test
(See full trace by running task with --trace)
13313ac2ec7ba7c43b1b952db034ff3b?d=identicon&s=25 Thomas E Enebo (Guest)
on 2015-02-26 17:42
(Received via mailing list)
Ok once I get things rearranged to eliminate the issues I know about I
will
see if I can reproduce this.  Thanks for the info.

-Tom

On Thu, Feb 26, 2015 at 10:22 AM, Keith Bennett
<keithrbennett@gmail.com>
This topic is locked and can not be replied to.