Bigdecimal issues

Bohuslav Kabrda bkabrda at redhat.com
Thu Jun 7 10:00:45 UTC 2012


Hi guys,
I don't know if any of you have been following the problems that we had with bigdecimal Gem after switch to Ruby 1.9.3 in Fedora 17. Here are some references: [1], [2], [3], [4].

TLDR: The problem is, that when we unbundled bigdecimal from Ruby and made it available only as a Gem (under %{gem_dir} and %{gem_extdir}), a hidden problem showed up - other Gems (like activesupport or arel) just suppose it to be in the stdlib path and do not specify dependency on it in gemspec (or Gemfile generated with new Rails app, for example). Our RPM Gems deal with this, because we adapted them and added bigdecimal to the gemspecs. But Gems installed using "gem install" or "bundle install" cannot draw in bigdecimal, because they don't depend on it. Also, even if it's installed, bundler doesn't load the bigdecimal Gem during runtime. (One of the problems here is, that the Gems cannot add bigdecimal into gemspec, because there exists no JRuby alternative. So the JRuby users wouldn't be able to install such Gems. [5])

As you can see, there are already people complaining about this behaviour ([3], [4]) and I wouldn't like anyone to go away from Fedora after the effort we put into the transition to Ruby 1.9.3.

An ideal solution would of course be a systematic one, solving it with Ruby and JRuby authors, so that bigdecimal is gemified properly and everyone can put it into Gemfile/gemspec. I would very much like to ask you, if you could help me and Vit with this effort, mainly at [1] and [5].

Meanwhile, I would like to propose this solution:
The bigdecimal Gem RPM would contain symlinks that would be placed into Ruby's stdlib path, where the files were originally bundled. By doing this, we can both achieve the intended behaviour and also provide the ability to load newer version of bigdecimal (unless installed by user from rubygems.org), if it comes out (note, that Ruby with unbundled bigdecimal doesn't have this ability, as the bigdecimal in the stdlib always gets into play). Also, bigdecimal would be a dependency of Ruby, so it would get installed alongside with it to solve the issue completely.

If anyone of you comes out with a better solution to this situation, please share it, so that we may resolve this issue in the best manner.

Thanks to all!

-- 
Regards,
Bohuslav "Slavek" Kabrda.

[1] https://bugs.ruby-lang.org/issues/6124
[2] https://github.com/rails/rails/issues/5355
[3] https://bugzilla.redhat.com/show_bug.cgi?id=829209
[4] http://forums.fedoraforum.org/showthread.php?t=279545
[5] http://jira.codehaus.org/browse/JRUBY-6704


More information about the ruby-sig mailing list