java - JRuby/Warbler 导致没有这样的文件要加载 -- bundler/dep_proxy

标签 java ruby-on-rails jruby warbler

我有一个大型 Rails 应用程序成功转换为使用 JRuby,它在本地运行没有任何问题 bundle exec rails s -b 0.0.0.0

我现在正在尝试使用以下内容创建一个可部署的 WAR 文件:

bundle exec warble 可执行文件 war

这成功完成,没有错误,但是当运行它时:

java -jar application.war

它启动,几秒钟后,它吐出这个错误:

2016-06-28 11:48:16.544:INFO::main: Logging initialized @228ms
2016-06-28 11:48:16.553:INFO:oejr.Runner:main: Runner
2016-06-28 11:48:16.698:INFO:oejs.Server:main: jetty-9.2.9.v20150224
2016-06-28 11:48:32.680:WARN:oeja.AnnotationConfiguration:main: ServletContainerInitializers: detected. Class hierarchy: empty
2016-06-28 11:48:33.692:INFO:/:main: INFO: jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]
2016-06-28 11:48:33.694:INFO:/:main: INFO: using a shared (threadsafe!) runtime
org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- bundler/dep_proxy
    at RUBY.block in expand_dependencies(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:630)
    at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1593)
    at RUBY.block in expand_dependencies(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:629)
    at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1593)
    at RUBY.expand_dependencies(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:626)
    at RUBY.converge_locked_specs(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:594)
    at RUBY.resolve(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:195)
    at RUBY.specs(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:140)
    at RUBY.specs_for(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:185)
    at RUBY.requested_specs(uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:174)
    at RUBY.requested_specs(uri:classloader:/gems/bundler-1.12.5/lib/bundler/environment.rb:19)
    at RUBY.setup(uri:classloader:/gems/bundler-1.12.5/lib/bundler/runtime.rb:14)
    at RUBY.setup(uri:classloader:/gems/bundler-1.12.5/lib/bundler.rb:95)
    at RUBY.<top>(uri:classloader:/gems/bundler-1.12.5/lib/bundler/setup.rb:9)
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:944)
    at RUBY.(root)(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1)
    at RUBY.<top>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:133)
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:944)
    at RUBY.(root)(/private/var/folders/9v/9b6v35h55nl94trls0l52h4c0000gn/T/jetty-0.0.0.0-8080-application.war-_-any-4553071680754868493.dir/webapp/WEB-INF/config/boot.rb:3)
    at RUBY.(root)(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1)
    at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
    at RUBY.<top>(uri:classloader:/jruby/rack/rails/environment3.rb:23)

由于无法加载 bundler/dep_proxy 而卡住了,谷歌搜索也没有找到类似的问题。我调整了 warbler 配置文件,但导致了同样的问题。

Ruby JRuby 是随 rbenv 安装的。

堆栈信息:

$ jruby -v
jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]

$ bundle env
Environment

    Bundler   1.12.5
    Rubygems  2.6.4
    Ruby      2.3.0p0 (2016-05-26 revision 52539) [java]
    Git       2.9.0

Gemfile

    source 'https://rubygems.org'

    ruby '2.3.0', :engine => 'jruby', :engine_version => '9.1.2.0'

    gem 'rails', '4.2.6'
    gem 'sass-rails', '~> 5.0'
    gem 'bourbon'
    gem 'font-awesome-sass'
    gem 'uglifier', '>= 1.3.0'
    gem 'jquery-rails'
    gem 'jquery-turbolinks'
    gem 'turbolinks'
    gem 'jbuilder', '~> 2.0'
    gem 'country_select'
    gem 'devise', '3.5.3'
    gem 'devise-i18n-views'
    gem 'devise-encryptable'
    gem 'devise_security_extension'
    gem 'cancancan'
    gem 'rolify'
    gem 'carrierwave'
    gem 'carrierwave-bombshelter'
    gem 'mini_magick'
    gem 'file_validators', '2.0.2'
    gem 'gretel'
    gem 'font-awesome-rails'
    gem 'kaminari'
    gem 'pg_search'
    gem 'responders'
    gem 'date_validator'
    gem 'validates_timeliness', '~> 4.0'
    gem 'roo', '~> 2.3.2'
    gem 'lipsum', :require => false
    gem 'faker', :require => false
    gem 'pushmeup', :require => false
    gem 'rack-attack'
    gem 'barby', :require => false
    gem 'prawn', :require => false
    gem 'rest-client', :require => false
    gem 'geokit', :require => false
    gem 'text', :require => false
    gem 'savon', :require => false
    gem 'plugg'
    gem 'postmark-rails', '~> 0.12.0'
    gem 'breadcrumbs_on_rails'

    platforms :ruby do
      gem 'pg'
      gem 'therubyracer'
    end

    platforms :jruby do
      gem 'jruby-jars'
      gem 'jruby-openssl'
      gem 'jruby-rack'
      gem 'activerecord-jdbcpostgresql-adapter'
      gem 'puma'
      gem 'therubyrhino'

      group :development, :test do
        gem 'warbler'
      end
    end

    group :development, :test do
      #gem 'spring'
      gem 'randumb'
      gem "activerecord-import", ">= 0.4.0", :require => false
      gem 'factory_girl'
      gem 'require_all'
      gem 'rails_real_favicon'
      gem 'i18n-tasks', '~> 0.9.4'
      gem 'i18n_generators'

      # Code Assessment Tools
      gem 'i15r', '~> 0.5.1'
      gem 'brakeman', :require => false
      gem 'bundler-audit'
      gem 'flog'
      gem 'rails_best_practices'
    end

    group :production do
      gem 'activerecord_url_connections'
      gem 'le'
      gem 'redis-rails'
      gem 'rack-timeout'
      gem 'rack-throttle'
      gem 'rack-cache', :require => 'rack/cache'
    end

    group :doc do
      gem 'sdoc', '~> 0.4.0'
    end

Gemfile.lock

    GEM
      remote: https://rubygems.org/
      specs:
        actionmailer (4.2.6)
          actionpack (= 4.2.6)
          actionview (= 4.2.6)
          activejob (= 4.2.6)
          mail (~> 2.5, >= 2.5.4)
          rails-dom-testing (~> 1.0, >= 1.0.5)
        actionpack (4.2.6)
          actionview (= 4.2.6)
          activesupport (= 4.2.6)
          rack (~> 1.6)
          rack-test (~> 0.6.2)
          rails-dom-testing (~> 1.0, >= 1.0.5)
          rails-html-sanitizer (~> 1.0, >= 1.0.2)
        actionview (4.2.6)
          activesupport (= 4.2.6)
          builder (~> 3.1)
          erubis (~> 2.7.0)
          rails-dom-testing (~> 1.0, >= 1.0.5)
          rails-html-sanitizer (~> 1.0, >= 1.0.2)
        activejob (4.2.6)
          activesupport (= 4.2.6)
          globalid (>= 0.3.0)
        activemodel (4.2.6)
          activesupport (= 4.2.6)
          builder (~> 3.1)
        activerecord (4.2.6)
          activemodel (= 4.2.6)
          activesupport (= 4.2.6)
          arel (~> 6.0)
        activerecord-import (0.14.1)
          activerecord (>= 3.2)
        activerecord-jdbc-adapter (1.3.20)
          activerecord (>= 2.2)
        activerecord-jdbcpostgresql-adapter (1.3.20)
          activerecord-jdbc-adapter (~> 1.3.20)
          jdbc-postgres (>= 9.1)
        activerecord_url_connections (0.0.7)
          activerecord
        activesupport (4.2.6)
          i18n (~> 0.7)
          json (~> 1.7, >= 1.7.7)
          minitest (~> 5.1)
          thread_safe (~> 0.3, >= 0.3.4)
          tzinfo (~> 1.1)
        addressable (2.4.0)
        akami (1.3.1)
          gyoku (>= 0.4.0)
          nokogiri
        arel (6.0.3)
        ast (2.3.0)
        barby (0.6.4)
        bcrypt (3.1.11-java)
        bourbon (4.2.7)
          sass (~> 3.4)
          thor (~> 0.19)
        brakeman (3.3.2)
        breadcrumbs_on_rails (2.3.1)
        builder (3.2.2)
        bundler-audit (0.5.0)
          bundler (~> 1.2)
          thor (~> 0.18)
        cancancan (1.15.0)
        carrierwave (0.11.2)
          activemodel (>= 3.2.0)
          activesupport (>= 3.2.0)
          json (>= 1.7)
          mime-types (>= 1.16)
          mimemagic (>= 0.3.0)
        carrierwave-bombshelter (0.2.2)
          activesupport (>= 3.2.0)
          carrierwave
          fastimage
        code_analyzer (0.4.5)
          sexp_processor
        coffee-rails (4.1.1)
          coffee-script (>= 2.2.0)
          railties (>= 4.0.0, < 5.1.x)
        coffee-script (2.4.1)
          coffee-script-source
          execjs
        coffee-script-source (1.10.0)
        concurrent-ruby (1.0.2-java)
        countries (1.2.5)
          currencies (~> 0.4.2)
          i18n_data (~> 0.7.0)
        country_select (2.5.2)
          countries (~> 1.2.0)
          sort_alphabetical (~> 1.0)
        currencies (0.4.2)
        date_validator (0.9.0)
          activemodel
          activesupport
        devise (3.5.3)
          bcrypt (~> 3.0)
          orm_adapter (~> 0.1)
          railties (>= 3.2.6, < 5)
          responders
          thread_safe (~> 0.1)
          warden (~> 1.2.3)
        devise-encryptable (0.2.0)
          devise (>= 2.1.0)
        devise-i18n-views (0.3.7)
        devise_security_extension (0.10.0)
          devise (>= 3.0.0, < 4.0)
          railties (>= 3.2.6, < 5.0)
        domain_name (0.5.20160615)
          unf (>= 0.0.5, < 1.0.0)
        easy_translate (0.5.0)
          json
          thread
          thread_safe
        erubis (2.7.0)
        execjs (2.7.0)
        factory_girl (4.7.0)
          activesupport (>= 3.0.0)
        faker (1.6.3)
          i18n (~> 0.5)
        fastimage (2.0.0)
          addressable (~> 2)
        file_validators (2.0.2)
          activemodel (>= 3.0)
          mime-types (>= 1.0)
        flog (4.4.0)
          path_expander (~> 1.0)
          ruby_parser (~> 3.1, > 3.1.0)
          sexp_processor (~> 4.4)
        font-awesome-rails (4.6.3.1)
          railties (>= 3.2, < 5.1)
        font-awesome-sass (4.6.2)
          sass (>= 3.2)
        geokit (1.10.0)
        globalid (0.3.6)
          activesupport (>= 4.1.0)
        gretel (3.0.8)
          rails (>= 3.2.0)
        gyoku (1.3.1)
          builder (>= 2.1.2)
        highline (1.7.8)
        http-cookie (1.0.2)
          domain_name (~> 0.5)
        httparty (0.13.7)
          json (~> 1.8)
          multi_xml (>= 0.5.2)
        httpi (2.4.2)
          rack
          socksify
        i15r (0.5.5)
        i18n (0.7.0)
        i18n-tasks (0.9.5)
          activesupport (>= 4.0.2)
          ast (>= 2.1.0)
          easy_translate (>= 0.5.0)
          erubis
          highline (>= 1.7.3)
          i18n
          parser (>= 2.2.3.0)
          term-ansicolor (>= 1.3.2)
          terminal-table (>= 1.5.1)
        i18n_data (0.7.0)
        i18n_generators (2.1.1)
          rails (>= 3.0.0)
        jbuilder (2.5.0)
          activesupport (>= 3.0.0, < 5.1)
          multi_json (~> 1.2)
        jdbc-postgres (9.4.1206)
        jquery-rails (4.1.1)
          rails-dom-testing (>= 1, < 3)
          railties (>= 4.2.0)
          thor (>= 0.14, < 2.0)
        jquery-turbolinks (2.1.0)
          railties (>= 3.1.0)
          turbolinks
        jruby-jars (9.1.2.0)
        jruby-openssl (0.9.17-java)
        jruby-rack (1.1.20)
        json (1.8.3-java)
        kaminari (0.17.0)
          actionpack (>= 3.0.0)
          activesupport (>= 3.0.0)
        le (2.7.2)
        lipsum (1.2.0)
          nokogiri
        loofah (2.0.3)
          nokogiri (>= 1.5.9)
        mail (2.6.4)
          mime-types (>= 1.16, < 4)
        mime-types (2.99.2)
        mimemagic (0.3.1)
        mini_magick (4.5.1)
        minitest (5.9.0)
        multi_json (1.12.1)
        multi_xml (0.5.5)
        netrc (0.11.0)
        nokogiri (1.6.8-java)
        nori (2.6.0)
        orm_adapter (0.5.0)
        parser (2.3.1.2)
          ast (~> 2.2)
        path_expander (1.0.0)
        pdf-core (0.6.1)
        pg_search (1.0.6)
          activerecord (>= 3.1)
          activesupport (>= 3.1)
          arel
        plugg (0.0.4)
        postmark (1.7.1)
          json
          rake
        postmark-rails (0.12.0)
          actionmailer (>= 3.0.0)
          postmark (~> 1.7.0)
        prawn (2.1.0)
          pdf-core (~> 0.6.1)
          ttfunk (~> 1.4.0)
        puma (3.4.0-java)
        pushmeup (0.3.0)
          httparty
          json
        rack (1.6.4)
        rack-attack (4.4.1)
          rack
        rack-cache (1.6.1)
          rack (>= 0.4)
        rack-test (0.6.3)
          rack (>= 1.0)
        rack-throttle (0.4.0)
          rack (>= 1.0.0)
        rack-timeout (0.4.2)
        rails (4.2.6)
          actionmailer (= 4.2.6)
          actionpack (= 4.2.6)
          actionview (= 4.2.6)
          activejob (= 4.2.6)
          activemodel (= 4.2.6)
          activerecord (= 4.2.6)
          activesupport (= 4.2.6)
          bundler (>= 1.3.0, < 2.0)
          railties (= 4.2.6)
          sprockets-rails
        rails-deprecated_sanitizer (1.0.3)
          activesupport (>= 4.2.0.alpha)
        rails-dom-testing (1.0.7)
          activesupport (>= 4.2.0.beta, < 5.0)
          nokogiri (~> 1.6.0)
          rails-deprecated_sanitizer (>= 1.0.1)
        rails-html-sanitizer (1.0.3)
          loofah (~> 2.0)
        rails_best_practices (1.16.0)
          activesupport
          code_analyzer (>= 0.4.3)
          erubis
          i18n
          json
          require_all
          ruby-progressbar
        rails_real_favicon (0.0.3)
          json (~> 1.7)
          rails (>= 3.1, < 5)
          rest-client (~> 1.8)
          rubyzip (~> 1)
        railties (4.2.6)
          actionpack (= 4.2.6)
          activesupport (= 4.2.6)
          rake (>= 0.8.7)
          thor (>= 0.18.1, < 2.0)
        rake (11.2.2)
        randumb (0.5.0)
          activerecord (>= 3.0.0)
          activesupport (>= 3.0.0)
          rake
        rdoc (4.2.2)
          json (~> 1.4)
        redis (3.3.0)
        redis-actionpack (4.0.1)
          actionpack (~> 4)
          redis-rack (~> 1.5.0)
          redis-store (~> 1.1.0)
        redis-activesupport (4.1.5)
          activesupport (>= 3, < 5)
          redis-store (~> 1.1.0)
        redis-rack (1.5.0)
          rack (~> 1.5)
          redis-store (~> 1.1.0)
        redis-rails (4.0.0)
          redis-actionpack (~> 4)
          redis-activesupport (~> 4)
          redis-store (~> 1.1.0)
        redis-store (1.1.7)
          redis (>= 2.2)
        require_all (1.3.3)
        responders (2.2.0)
          railties (>= 4.2.0, < 5.1)
        rest-client (1.8.0)
          http-cookie (>= 1.0.2, < 2.0)
          mime-types (>= 1.16, < 3.0)
          netrc (~> 0.7)
        rolify (5.1.0)
        roo (2.3.2)
          nokogiri (~> 1)
          rubyzip (~> 1.1, < 2.0.0)
        ruby-progressbar (1.8.1)
        ruby_parser (3.8.2)
          sexp_processor (~> 4.1)
        rubyzip (1.2.0)
        sass (3.4.22)
        sass-rails (5.0.4)
          railties (>= 4.0.0, < 5.0)
          sass (~> 3.1)
          sprockets (>= 2.8, < 4.0)
          sprockets-rails (>= 2.0, < 4.0)
          tilt (>= 1.1, < 3)
        savon (2.11.1)
          akami (~> 1.2)
          builder (>= 2.1.2)
          gyoku (~> 1.2)
          httpi (~> 2.3)
          nokogiri (>= 1.4.0)
          nori (~> 2.4)
          wasabi (~> 3.4)
        sdoc (0.4.1)
          json (~> 1.7, >= 1.7.7)
          rdoc (~> 4.0)
        sexp_processor (4.7.0)
        socksify (1.7.0)
        sort_alphabetical (1.0.2)
          unicode_utils (>= 1.2.2)
        sprockets (3.6.2)
          concurrent-ruby (~> 1.0)
          rack (> 1, < 3)
        sprockets-rails (3.1.0)
          actionpack (>= 4.0)
          activesupport (>= 4.0)
          sprockets (>= 3.0.0)
        term-ansicolor (1.3.2)
          tins (~> 1.0)
        terminal-table (1.6.0)
        text (1.3.1)
        therubyrhino (2.0.4)
          therubyrhino_jar (>= 1.7.3)
        therubyrhino_jar (1.7.6)
        thor (0.19.1)
        thread (0.2.2)
        thread_safe (0.3.5-java)
        tilt (2.0.5)
        timeliness (0.3.8)
        tins (1.10.2)
        ttfunk (1.4.0)
        turbolinks (2.5.3)
          coffee-rails
        tzinfo (1.2.2)
          thread_safe (~> 0.1)
        uglifier (3.0.0)
          execjs (>= 0.3.0, < 3)
        unf (0.1.4-java)
        unicode_utils (1.4.0)
        validates_timeliness (4.0.2)
          timeliness (~> 0.3.7)
        warbler (2.0.3)
          jruby-jars (>= 9.0.0.0)
          jruby-rack (>= 1.1.1, < 1.3)
          rake (>= 10.1.0)
          rubyzip (~> 1.0, < 1.4)
        warden (1.2.6)
          rack (>= 1.0)
        wasabi (3.5.0)
          httpi (~> 2.0)
          nokogiri (>= 1.4.2)

    PLATFORMS
      java

    DEPENDENCIES
      activerecord-import (>= 0.4.0)
      activerecord-jdbcpostgresql-adapter
      activerecord_url_connections
      barby
      bourbon
      brakeman
      breadcrumbs_on_rails
      bundler-audit
      cancancan
      carrierwave
      carrierwave-bombshelter
      country_select
      date_validator
      devise (= 3.5.3)
      devise-encryptable
      devise-i18n-views
      devise_security_extension
      factory_girl
      faker
      file_validators (= 2.0.2)
      flog
      font-awesome-rails
      font-awesome-sass
      geokit
      gretel
      i15r (~> 0.5.1)
      i18n-tasks (~> 0.9.4)
      i18n_generators
      jbuilder (~> 2.0)
      jquery-rails
      jquery-turbolinks
      jruby-jars
      jruby-openssl
      jruby-rack
      kaminari
      le
      lipsum
      mini_magick
      pg
      pg_search
      plugg
      postmark-rails (~> 0.12.0)
      prawn
      puma
      pushmeup
      rack-attack
      rack-cache
      rack-throttle
      rack-timeout
      rails (= 4.2.6)
      rails_best_practices
      rails_real_favicon
      randumb
      redis-rails
      require_all
      responders
      rest-client
      rolify
      roo (~> 2.3.2)
      sass-rails (~> 5.0)
      savon
      sdoc (~> 0.4.0)
      text
      therubyracer
      therubyrhino
      turbolinks
      uglifier (>= 1.3.0)
      validates_timeliness (~> 4.0)
      warbler

    RUBY VERSION
       ruby 2.3.0p0 (jruby 9.1.2.0)

    BUNDLED WITH
       1.12.5

鸣叫配置文件:

Warbler::Config.new do |config|
  config.webxml.rails.env = 'development'
  config.features = %w(gemjar executable)
  config.dirs = %w(app config db lib log vendor tmp modules public)
  config.includes = FileList['Rakefile', 'lib/tasks/generate_ident.rake']
  config.excludes = FileList["test/*"]
  config.bundle_without = ["development", "test", "assets", "doc"]
  config.jar_name = "application"
end

我一直在使用的扩展 Warbler 配置:

Warbler::Config.new do |config|
  config.features = %w(gemjar compiled executable)
  config.dirs = %w(app config db lib log vendor tmp modules public)
  config.includes = FileList['Rakefile', 'lib/tasks/generate_ident.rake']
  config.excludes = FileList["test/*", '.DS_Store']
  config.java_libs += FileList["lib/*.jar"]
  config.bundler = true
  config.bundle_without = ["development", "test", "assets", "doc"]
  config.gem_dependencies = true
  config.gem_excludes = [/^(test|spec)\//, /_test.rb/, /rails_generator/]
  config.jar_name = "application"
  config.compiled_ruby_files = FileList['app/**/*.rb', 'config/*.rb', 'config/**/*.rb',  'lib/*.rb', 'lib/**/*.rb', 'modules/*.rb', 'modules/**/*.rb']
  config.override_gem_home = true
  config.move_jars_to_webinf_lib = true
  config.webxml.rails.env = ENV['RAILS_ENV'] || 'development'
  config.webxml.jruby.min.runtimes = 2
  config.webxml.jruby.max.runtimes = 8
end

是否有我忽略的配置或其他内容?

更新:

在 Tomcat(7) 中运行独立 WAR,吐出同样的错误和更多信息:

--- System
jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.91-b14 on 1.8.0_91-b14 +jit [linux-x86_64]
Time: 2016-06-30 10:06:49 +0000
Server: Apache Tomcat/7.0.52 (Ubuntu)
jruby.home: uri:classloader://META-INF/jruby.home

--- Context Init Parameters:
jruby.max.runtimes = 8
jruby.min.runtimes = 2
public.root = /
rails.env = development

--- Backtrace
LoadError: no such file to load -- bundler/dep_proxy
  block in expand_dependencies at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:630
                          each at org/jruby/RubyArray.java:1593
  block in expand_dependencies at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:629
                          each at org/jruby/RubyArray.java:1593
           expand_dependencies at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:626
         converge_locked_specs at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:594
                       resolve at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:195
                         specs at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:140
                     specs_for at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:185
               requested_specs at uri:classloader:/gems/bundler-1.12.5/lib/bundler/definition.rb:174
               requested_specs at uri:classloader:/gems/bundler-1.12.5/lib/bundler/environment.rb:19
                         setup at uri:classloader:/gems/bundler-1.12.5/lib/bundler/runtime.rb:14
                         setup at uri:classloader:/gems/bundler-1.12.5/lib/bundler.rb:95
                         <top> at uri:classloader:/gems/bundler-1.12.5/lib/bundler/setup.rb:19
                       require at org/jruby/RubyKernel.java:944
                        (root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
                         <top> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:133
                          load at org/jruby/RubyKernel.java:962
                         <top> at /var/lib/tomcat7/webapps/application/WEB-INF/config/boot.class:3
                       require at org/jruby/RubyKernel.java:944
                        (root) at /var/lib/tomcat7/webapps/application/WEB-INF/config/boot.rb:1
                        (root) at /var/lib/tomcat7/webapps/application/WEB-INF/config/boot.rb:1
                        (root) at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
                         <top> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55

--- RubyGems
Gem.dir: /var/lib/tomcat7/webapps/application/WEB-INF/gems
Gem.path:
/usr/share/tomcat7/.gem/jruby/2.3.0
uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared
/var/lib/tomcat7/webapps/application/WEB-INF/gems
Activated gems:
  bundler-1.12.5

--- Bundler
Bundler.bundle_path: /var/lib/tomcat7/webapps/application/WEB-INF/gems
Bundler.root: /var/lib/tomcat7/webapps/application/WEB-INF
Gemfile: /var/lib/tomcat7/webapps/application/WEB-INF/Gemfile
Settings:
  gemfile = /var/lib/tomcat7/webapps/application/WEB-INF/Gemfile
  without = development:test:assets:doc
  orig_path = /bin:/usr/bin:/sbin:/usr/sbin

--- JRuby-Rack Config
compat_version =
default_logger = org.jruby.rack.logging.StandardOutLogger@5b18447d
equals = <error: >
err = org.apache.tomcat.util.log.SystemLogHandler@d610b4f
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_memory_buffer_size =
initial_runtimes = 2
jms_connection_factory =
jms_jndi_properties =
logger = org.jruby.rack.logging.ServletContextLogger@5be8fe29
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_memory_buffer_size =
maximum_runtimes = 8
num_initializer_threads =
out = org.apache.tomcat.util.log.SystemLogHandler@3b4aedd8
rackup =
rackup_path =
rewindable = true
runtime_arguments =
runtime_environment =
runtime_timeout_seconds =
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@1097ea05
throw_init_exception = false

--- $LOAD_PATH:
uri:classloader:/META-INF/jruby.home/lib/ruby/2.3/site_ruby
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib

更新 2:

我已经尝试了从最新版本一直到 1.10 的每个版本的 bundler,结果完全相同。

我也将 JRuby 降级到 1.7.25,同样的问题。

最佳答案

问题是特征线:

config.features = %w(gemjar 编译后的可执行文件)

如果我将其更改为:

,问题就会消失

config.features = %w(已编译的可执行文件)

我认为这是一个错误,因为 Warbler 的文档说明如下:

gemjar: This bundles all gems into a single gem file to reduce the number of files in the .war. This is mostly useful for Google AppEngine where the number of files per application has a limit. (Note: not applicable for jar-based applications.)

关于java - JRuby/Warbler 导致没有这样的文件要加载 -- bundler/dep_proxy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38071575/

相关文章:

java - Android Studio 下载管理器错误 : IllegalArgumentException Expected file scheme in URI

Java加载属性文件java.lang.NullPointerException错误

java - .then接受字符串

javascript - 单击时将 2 个 Bootstrap 列替换为 2 个隐藏列。 rails 4, Bootstrap

ruby-on-rails - Phoenix Rails 的 'head :ok' 相当于什么?

ruby - 为什么 jruby-openssl gem 有奇怪的文件夹结构?

java - 在 swing 中使用 JFXPanel 集成 fxml 文件

ruby-on-rails - Rails route.rb-不区分大小写

jruby - 有没有办法在 jruby 中获得合理的堆栈跟踪?

ruby - 使用基于 ruby​​ 运行时的插件重新启动后,jenkins 会丢失构建后操作设置