Skip to content

undefined method runtime' for JRuby:Module on Travis CI when running rubocop for rspec-rails` #6125

@pirj

Description

@pirj

Environment Information

Provide at least:

JRUBY_OPT=--dev JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED"
  • Operating system and platform (e.g. uname -a)
    Description: Ubuntu 14.04.5 LTS
    Release: 14.04

Other relevant info you may wish to add:

Expected Behavior

rubocop runs with not errors

  • Describe your expectation of how JRuby should behave, perhaps by showing how CRuby/MRI behaves.

Same build, other jobs for MRI pass https://travis-ci.org/github/rspec/rspec-rails/builds/664005783

  • Provide an executable Ruby script or a link to an example repository.

https://github.com/rspec/rspec-rails/tree/ddd29efbfa4425c815fb774a4d3b04d1fa232d28

Actual Behavior

2.2.0-java.gemspec:18.

NoMethodError: undefined method `runtime' for JRuby:Module
  <class:Parser> at /home/travis/.rvm/rubies/jruby-head/lib/ruby/stdlib/racc/parser.rb:192
   <module:Racc> at /home/travis/.rvm/rubies/jruby-head/lib/ruby/stdlib/racc/parser.rb:182
          <main> at /home/travis/.rvm/rubies/jruby-head/lib/ruby/stdlib/racc/parser.rb:176
         require at org/jruby/RubyKernel.java:974
          <main> at /home/travis/build/rspec/bundle/jruby/2.5.0/gems/parser-2.7.0.4/lib/parser.rb:12
         require at org/jruby/RubyKernel.java:974
          <main> at /home/travis/build/rspec/bundle/jruby/2.5.0/gems/rubocop-0.80.1/lib/rubocop.rb:3
         require at org/jruby/RubyKernel.java:974
          <main> at /home/travis/build/rspec/bundle/jruby/2.5.0/gems/rubocop-0.80.1/exe/rubocop:6
            load at org/jruby/RubyKernel.java:1009
          <main> at /home/travis/build/rspec/rspec-rails/bin/rubocop:29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions