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-openssl doesn't get packaged in war file #339

Closed
atambo opened this issue Aug 28, 2015 · 5 comments
Closed

jruby-openssl doesn't get packaged in war file #339

atambo opened this issue Aug 28, 2015 · 5 comments

Comments

@atambo
Copy link
Member

atambo commented Aug 28, 2015

When putting 'jruby-openssl' into my Gemfile and then deploying the war I get:

org.jruby.rack.RackInitializationException: Could not find jruby-openssl-0.9.10-java in any of the sources
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `materialize'
        from org/jruby/RubyArray.java:2446:in `map!'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `materialize'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/definition.rb:140:in `specs'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/definition.rb:185:in `specs_for'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/definition.rb:174:in `requested_specs'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/environment.rb:18:in `requested_specs'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb:13:in `setup'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler.rb:127:in `setup'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/gems/gems/bundler-1.10.6/lib/bundler/setup.rb:18:in `(root)'
        from org/jruby/RubyKernel.java:1040:in `require'
        from classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
        from classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:128:in `require'
        from org/jruby/RubyKernel.java:1040:in `require'
        from /opt/ibm/WEX-appbuilder/AppBuilder/wlp/usr/servers/AppBuilder/apps/AppBuilder/WEB-INF/config/boot.rb:17:in `(root)'
        from classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
        from classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54:in `require'
        from classpath:/jruby/rack/rails/environment3.rb:23:in `load_environment'

I also get the error if I put config.gems += ["jruby-openssl"] into my warble.rb configuration.

@mkristian
Copy link
Member

@atambo which jruby version are you using for packing the war ? which warbler or jruby-jars version ?

it sounds like a default gem problem.

@atambo
Copy link
Member Author

atambo commented Aug 29, 2015

It is jruby-jars 1.7.22 and warbler 1.4.9.

@atambo
Copy link
Member Author

atambo commented Sep 1, 2015

So I set my Gemfile to use jruby-openssl 0.9.11 (while the packaged one in jruby-jars is 0.9.10) and now the gem is within the war file and bundler can find it. So I'd say this is a bug where bundler within a war file cannot find the default gems.

@mkristian
Copy link
Member

yes, but a difficult one. bundler does not include default gems in its Gemfile.lock. the Gemfile.lock does depend on the jruby version with which it got created. the jruby (or MRI) you are using to run warbler does not know about the default gems used creating the Gemfile.lock or for the jruby which goes into the war file. hope you get the idea what I try to say - there is not "descriptor" for those embedded default gems.

@kares
Copy link
Member

kares commented May 17, 2016

this is a generic issue with default gems ... we'll need to adjust/patch Bundler to resolve this.
... closing as duplicate of #376

@kares kares closed this as completed May 17, 2016
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

3 participants