Skip to content
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 9.1.7.0 #689

Closed
j-mcnally opened this issue Mar 2, 2017 · 7 comments
Closed

JRuby 9.1.7.0 #689

j-mcnally opened this issue Mar 2, 2017 · 7 comments

Comments

@j-mcnally
Copy link

Fails when loading webmock/rspec but i think its a conflict on my side but i cant sort it out.

NoMethodError: undefined method `call' for nil:NilClass
Did you mean?  caller
                  load at org/jruby/RubyMarshal.java:145
                  load at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/activesupport-5.0.2/lib/active_support/core_ext/marshal.rb:4
         block in IDNA at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/idna/pure.rb:336
                  open at org/jruby/RubyIO.java:1141
         <module:IDNA> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/idna/pure.rb:335
  <module:Addressable> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/idna/pure.rb:20
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/idna/pure.rb:19
               require at org/jruby/RubyKernel.java:961
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/idna.rb:1
               require at org/jruby/RubyKernel.java:961
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/idna.rb:24
               require at org/jruby/RubyKernel.java:961
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/uri.rb:1
               require at org/jruby/RubyKernel.java:961
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/addressable-2.5.0/lib/addressable/uri.rb:20
               require at org/jruby/RubyKernel.java:961
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/webmock-1.23.0/lib/webmock.rb:1
               require at org/jruby/RubyKernel.java:961
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/webmock-1.23.0/lib/webmock.rb:3
                  load at org/jruby/RubyKernel.java:979
       block in (root) at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/webmock-1.23.0/lib/webmock/rspec.rb:1
                  each at org/jruby/RubyArray.java:1733
                (root) at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/webmock-1.23.0/lib/webmock/rspec.rb:1
                (root) at /Users/jmcnally/projects/chowly/gems/orderup/spec/spec_helper.rb:1
                (root) at /Users/jmcnally/projects/chowly/gems/orderup/spec/spec_helper.rb:2
                (root) at /Users/jmcnally/projects/chowly/gems/orderup/spec/utils/scraper_spec.rb:1
                (root) at /Users/jmcnally/projects/chowly/gems/orderup/spec/utils/scraper_spec.rb:1
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1
                  load at org/jruby/RubyKernel.java:979
                <eval> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361
                  eval at org/jruby/RubyKernel.java:1000
                <main> at /Users/jmcnally/.rvm/gems/jruby-9.1.7.0/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359
@j-mcnally
Copy link
Author

Oh hmm, moving the webmock/rspec include to the top of the file resolved it.

@steveh
Copy link

steveh commented Mar 15, 2017

@j-mcnally what exactly did you change? I'm getting the same issue

@j-mcnally
Copy link
Author

So i was wrong. Activesupport does some strange patching to core_ext marshal.

I fully resolved the issue by downgrading Active support from 5.x to 4.x

Hope that helps. it took a while to figure out the exact problem, but the active support marshall monkey patch seemed to be the root cause.

Not sure if this is a Jruby issue or a Active support issue, it may have been resolved in a newer active support or jruby.

By moving my include it probably loaded the webmock parts above the patch or something not really sure. But the problem came back in the addressable library elsewhere specifically where it loads a binary db that defines ip space and uses marshall load for that.

The full fix was downgrading active support.

@steveh
Copy link

steveh commented Mar 15, 2017

@j-mcnally thanks for that! I don't think I'm using anything rails 5 specific so I'll try downgrade.

@j-mcnally
Copy link
Author

👍

@steveh
Copy link

steveh commented Mar 20, 2017

@j-mcnally and any others googling, this might be it.

rails/rails#28342
jruby/jruby#4526

@j-mcnally
Copy link
Author

Yep 100%, glad its being tracked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants