Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: JRuby 1.5.6
    • Fix Version/s: None
    • Component/s: OpenSSL
    • Labels:
      None
    • Environment:
      JRuby 1.5.6, jruby-openssl 0.7.2, Rails 3 and Bundler
    • Number of attachments :
      0

      Description

      We're using Bundler and added jruby-openssl as a dependency. Now it seems that when JRuby starts (https://github.com/jruby/jruby/blob/master/lib/ruby/site_ruby/shared/jruby/openssl/gem.rb), openssl is loaded and the latest installed version of the gem gets activated. This is a problem when you have both versions 0.7.2 and 0.7.3 installed, but told Bundler to use version 0.7.2:

      "org.jruby.exceptions.RaiseException: You have already activated jruby-openssl 0.7.3, but your Gemfile requires jruby-openssl 0.7.2."

      Please let me know if you need any more details.

        Issue Links

          Activity

          Hide
          Hiro Asari added a comment -

          Good point, but do you have a reason to require jruby-openssl 0.7.2?

          Show
          Hiro Asari added a comment - Good point, but do you have a reason to require jruby-openssl 0.7.2?
          Hide
          Daniel Harrington added a comment -

          We do. We need full SSL-Support inside our apps (WAR-Files). And the whole idea behind Bundler is to have an isolated environment. For this to work though, no Gem's (to be managed/activated via Bundler) can be required before Bundler sets up the environment.

          Show
          Daniel Harrington added a comment - We do. We need full SSL-Support inside our apps (WAR-Files). And the whole idea behind Bundler is to have an isolated environment. For this to work though, no Gem's (to be managed/activated via Bundler) can be required before Bundler sets up the environment.
          Hide
          John Firebaugh added a comment -

          I think what Hiro meant was, do you have a reason to require 0.7.2 specifically, rather than 0.7.3?

          We encountered this bug too, but worked around it by doing `bundle update jruby-openssl`, which resulted in Gemfile.lock requiring 0.7.3 instead.

          Show
          John Firebaugh added a comment - I think what Hiro meant was, do you have a reason to require 0.7.2 specifically, rather than 0.7.3? We encountered this bug too, but worked around it by doing `bundle update jruby-openssl`, which resulted in Gemfile.lock requiring 0.7.3 instead.
          Hide
          Daniel Harrington added a comment - - edited

          no we don't have a reason to not use the latest version of jruby-openssl. we actually discovered this by accident (because we don't always update all dependencies). but it still broke all our apps on the ci server and finding out why this happened wasn't too easy.

          even though upgrading to the latest version of jruby-openssl or removing the local (old) gem "fixes" the problem ... it's really just a workaround and not the solution to this problem.

          Show
          Daniel Harrington added a comment - - edited no we don't have a reason to not use the latest version of jruby-openssl. we actually discovered this by accident (because we don't always update all dependencies). but it still broke all our apps on the ci server and finding out why this happened wasn't too easy. even though upgrading to the latest version of jruby-openssl or removing the local (old) gem "fixes" the problem ... it's really just a workaround and not the solution to this problem.
          Hide
          Jim Meyer added a comment -

          Agreed, this is not a solution. I'm stuck at the moment because I don't have time to see if this matters to us or not, in the midst of work that's big enough that I don't want to confound myself with non-essential changes.

          Did anyone look into the root cause of this?

          Show
          Jim Meyer added a comment - Agreed, this is not a solution. I'm stuck at the moment because I don't have time to see if this matters to us or not, in the midst of work that's big enough that I don't want to confound myself with non-essential changes. Did anyone look into the root cause of this?
          Hide
          Daniel Harrington added a comment -

          This seems to be linked to JRUBY-5752.

          Show
          Daniel Harrington added a comment - This seems to be linked to JRUBY-5752 .
          Hide
          Jim Meyer added a comment -

          Could we at least shift this to being a bug?

          Show
          Jim Meyer added a comment - Could we at least shift this to being a bug?
          Hide
          Hiroshi Nakamura added a comment -

          Daniel: Thanks for reporting. I agree with you that JRUBY-5752 is the same issue.

          Show
          Hiroshi Nakamura added a comment - Daniel: Thanks for reporting. I agree with you that JRUBY-5752 is the same issue.
          Hide
          Hiroshi Nakamura added a comment -

          I understand that it's an issue of JRuby for automatically activating the latest gem. We want to offer an experience as if jruby-openssl is bundled with JRuby, and we're using gem as a way to do that. We don't want to allow users to specify the particular jruby-openssl version by RubyGems or Bundler.

          JRuby-openssl should be bundled with JRuby in the future, but it would not happen soon. I don't have any idea how to solve this issue...

          Show
          Hiroshi Nakamura added a comment - I understand that it's an issue of JRuby for automatically activating the latest gem. We want to offer an experience as if jruby-openssl is bundled with JRuby, and we're using gem as a way to do that. We don't want to allow users to specify the particular jruby-openssl version by RubyGems or Bundler. JRuby-openssl should be bundled with JRuby in the future, but it would not happen soon. I don't have any idea how to solve this issue...
          Hide
          Hiroshi Nakamura added a comment -

          JRUBY-5035 should be the ultimate resolution. Sorry we cannot offer you a workaround to use "not the latest jruby-openssl gem".

          Let us know the trouble you have when you move to the latest version then we could provide you a workaround for that.

          Show
          Hiroshi Nakamura added a comment - JRUBY-5035 should be the ultimate resolution. Sorry we cannot offer you a workaround to use "not the latest jruby-openssl gem". Let us know the trouble you have when you move to the latest version then we could provide you a workaround for that.

            People

            • Assignee:
              Hiroshi Nakamura
              Reporter:
              Daniel Harrington
            • Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: