elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
14.2k stars 3.5k forks source link

Issue while running rspec #11449

Open amitavmohanty01 opened 4 years ago

amitavmohanty01 commented 4 years ago

Issue:

$ bin/rspec
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019-12-18T01:52:09.183+05:30 [main] WARN FilenoUtil : Native subprocess control requires open access to sun.nio.ch
Pass '--add-opens java.base/sun.nio.ch=org.jruby.dist' or '=org.jruby.core' to enable.
Bundler::GemNotFound: Could not find addressable-2.7.0 in any of the sources
        materialize at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:91
               map! at org/jruby/RubyArray.java:2612
        materialize at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:85
              specs at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:185
          specs_for at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:237
    requested_specs at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:226
  definition_method at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:108
              setup at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:20
              setup at /Users/amitav.mohanty/Documents/src/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:107
             setup! at /Users/amitav.mohanty/Documents/src/logstash/lib/bootstrap/bundler.rb:62
             <main> at /Users/amitav.mohanty/Documents/src/logstash/lib/bootstrap/rspec.rb:3

There are two issues here.

2019-12-18T01:52:09.183+05:30 [main] WARN FilenoUtil : Native subprocess control requires open access to sun.nio.ch
Pass '--add-opens java.base/sun.nio.ch=org.jruby.dist' or '=org.jruby.core' to enable.

The above can be solved by upgrading jruby-launcher. The relevant discussion is here. I added gem 'jruby-launcher', '1.1.10' to the Gemfile to resolve it. I can send a patch adding it to the template. Please suggest if that is correct.

The second part of the problem is finding addressable gem. It is part of Gemfile.lock and the version sought after is also installed yet this issue is showing up. Any suggestions?

amitavmohanty01 commented 4 years ago
$ ruby -v
jruby 9.2.7.0 (2.5.3) 2019-04-09 8a269e3 OpenJDK 64-Bit Server VM 11.0.5+10 on 11.0.5+10 +jit [darwin-x86_64]