Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: JRuby 1.6.7
    • Fix Version/s: None
    • Component/s: Extensions
    • Labels:
      None
    • Environment:
      Fedora 17
    • Number of attachments :
      0

      Description

      The MRI Ruby 1.9.3 came with some libraries split into Gems - for example bigdecimal and io-console. In Fedora we unbundled them and made them normal Gems. The reason to unbundle them is simple - if newer versions are installed, they only get picked up if they are in gemspec files or Gemfiles and installed as normal Gems - otherwise the versions in Ruby library path get picked up by Bundler.

      So the problem is, that we now need to add e.g. bigdecimal to gemspec files, but that doesn't work with JRuby, because there is no bigdecimal (or io-console) Gem for JRuby. Would it be possible to provide these (because they are written in C, some kind of Java counterpart would be needed)? For the related issues, see [1] (fake gems problems in general) and [2] (activesupport uses bigdecimal, but doesn't have it in gemspec).

      [1] https://bugs.ruby-lang.org/issues/6124
      [2] https://github.com/rails/rails/issues/5355

        Activity

        Hide
        Bohuslav "Slavek" Kabrda added a comment -

        Apart from what I have mentioned in the initial comment of this bugreport, you can see https://bugs.ruby-lang.org/issues/6590 (Charles's report on ruby-core). I don't want to to summarize it in this comment, because it would be too long. Just one quick problem that this causes:

        1) You have an app, that relies on a fake gem, let's say it's bigdecimal. You use bundler and you want the app to run on both mri ruby and jruby, so you don't place bigdecimal in the Gemfile.
        2) New version of bigdecimal gets released and you want to use the new functionality provided in it.
        3) Since bigdecimal is not in the Gemfile, it doesn't get loaded as a Gem. The bundled (old) version from MRI ruby gets in play.
        4) You have no way to use the new bigdecimal Gem on MRI ruby, while keeping the ability to run the app on jruby too
        5) Also, there is no way you can tell that the currently used bigdecimal in MRI provides the same functionality as the jruby implementation, as you can't specify the version in Gemfile (so effectively you have no way of telling what codebase your app is using).

        TLDR: It's not theoretical, although it hasn't yet caused any significant problems

        Show
        Bohuslav "Slavek" Kabrda added a comment - Apart from what I have mentioned in the initial comment of this bugreport, you can see https://bugs.ruby-lang.org/issues/6590 (Charles's report on ruby-core). I don't want to to summarize it in this comment, because it would be too long. Just one quick problem that this causes: 1) You have an app, that relies on a fake gem, let's say it's bigdecimal. You use bundler and you want the app to run on both mri ruby and jruby, so you don't place bigdecimal in the Gemfile. 2) New version of bigdecimal gets released and you want to use the new functionality provided in it. 3) Since bigdecimal is not in the Gemfile, it doesn't get loaded as a Gem. The bundled (old) version from MRI ruby gets in play. 4) You have no way to use the new bigdecimal Gem on MRI ruby, while keeping the ability to run the app on jruby too 5) Also, there is no way you can tell that the currently used bigdecimal in MRI provides the same functionality as the jruby implementation, as you can't specify the version in Gemfile (so effectively you have no way of telling what codebase your app is using). TLDR: It's not theoretical, although it hasn't yet caused any significant problems
        Hide
        Hiro Asari added a comment -

        OK, so placing bigdecimal in Gemfile is bad (or bigdecimal gem can't be installed on JRuby).

        Show
        Hiro Asari added a comment - OK, so placing bigdecimal in Gemfile is bad (or bigdecimal gem can't be installed on JRuby).
        Hide
        Bohuslav "Slavek" Kabrda added a comment -

        Yes, it is bad, but it shouldn't

        Show
        Bohuslav "Slavek" Kabrda added a comment - Yes, it is bad, but it shouldn't
        Hide
        Charles Oliver Nutter added a comment -

        It looks like the MRI issue has been assigned, but there doesn't appear to be any action yet. We are largely waiting on them to either give us access to release -java versions of these gems, or to do that themselves.

        Show
        Charles Oliver Nutter added a comment - It looks like the MRI issue has been assigned, but there doesn't appear to be any action yet. We are largely waiting on them to either give us access to release -java versions of these gems, or to do that themselves.
        Hide
        Charles Oliver Nutter added a comment -

        Still no action from ruby-core. Grumble.

        Show
        Charles Oliver Nutter added a comment - Still no action from ruby-core. Grumble.

          People

          • Assignee:
            Unassigned
            Reporter:
            Bohuslav "Slavek" Kabrda
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: